Condition

Hey All,

i have this condition

It’s firing a function which returns

{
  "hasPurchase": "True",
  "hasFinance": "True"
}

In the condition I have set expression: "{actionResult.hasPurchase}" === "true" but the true and false don’t seem to work…

actionResult.hasPurchase changes from false to true if I add/remove the usergroup but the message just fires the false value… LOL

image

but I have the correct user group. Thats why it says at the start true

What am I doing wrong???

We’re not on Kinetic yet, it’s a big leap from how Classic is customized. Are you sure you got the syntax correct? Could this be done as a Pre-process BPM on the save method? That’s where I put checking user groups as it’s a server function not a UI function.

How would you check if the column has been changed? I didnt find the column changed from any to other… in conditions

Remember, I’m a Kinetic Noob, and I stayed in a Javascript hotel last night…

have you tried {actionResult.hasPurchase} == true

Pre-Process condition block has it.

2 Likes

Show off!

Did it work?

Havent tried yet. Currently at the dentist :grimacing:

@Randy is correct… the best place to put “business logic” is in a BPM rather than in the UI. You can put logic in the UI if necessary but it is often safer to do it in the BPM because then it is not dependant on which UI you are using. it relies instead on which business object (or data set if you use a data bpm) is active.

3 Likes

Comedy Cbc GIF by Run The Burbs

1 Like

Let’s all just take some time to appreciate this error message.

Prayer GIF

I ended up doing it in a bpm. Its not the most effective thing but it works… meh

1 Like