Jdg50
Jdg50

Reputation: 448

!= Statement in workflow condition?

I have a workflow that I'm trying to add a formula to a condition. Normally, I can use the visual builder.

The visual builder section goes something like:

user != John Smith, Bob Jones, Bill Gates

Using the visual builder, my workflow will execute the desired action without issue. I want to turn this into a straight formula for my own purposes/ease of use.

I've tried variations of

{user} != "John Smith, Bob Jones, Bill Gates"
{user} != ("John Smith", "Bob Jones", "Bill Gates")
nlapigetuser() != 3, 4, 5

As well as different variations of trying to use the "CASE" formula. None of them will execute the action within the workflow.

Is what I'm trying to do possible? I'd like to think it is but I may be going about this the wrong way. I've tried various searching around the site, and the closest I can find is in NS documentation that states SQL such as {today} cannot be used in a workflow condition, which is why I was trying to use nlapigetuser(), which returns the internal ID of the active user.

I want to think out of all the variations I've tried, (can't remember them all), I've just got a syntax issue somewhere. (Hopefully?)

What's the correct formula to use, if possible, to get my workflow to execute using a formula versus the visual builder?

Upvotes: 0

Views: 1092

Answers (1)

Jdg50
Jdg50

Reputation: 448

Silly me, if I clicked on "Formula" after I had already used the visual builder, NS automatically converted it to a formula.

Here's what I am now using:

({user.id} is null or {user.id} not in (11,3,18,8))

Upvotes: 2

Related Questions