Jump to content

Progressive Capture Branch Node - If answer is NULL


samwoo

Recommended Posts

Hello,

i'm trying to use a branch to detect whether or not an answer is empty. The Custom Expression below doesn't progress properly if you press "Next" when leaving the question blank:

IS empty.png

The only way to get it working is if you click in the field, insert a space then delete it... when you press next it detects it to be empty and progresses to the next set of forms. Otherwise just pressing next without adding the space in the first place will send it through the "No Match" direction which is not what we want.

Could we have the following conditions added to the Custom Expressions (which ignores any input from the user in the third field)

  • Question Answer IS NULL
  • Question Answer IS NOT NULL

Thanks,

Samuel

Link to comment
Share on other sites

Hi Martyn,

thanks for getting in touch. When I use the '' it still take it down the "No Match" route of the branch.

I'm testing this in the Self Service Portal so not sure if this is the reason why its not working. I did the "space" workaround and it did work, but not feasible as customers wouldn't know of this.

Thanks,

Samuel

Link to comment
Share on other sites

Hi Dead,

Sadly that doesn't work :( Thanks for the suggestion though.

I believe its called Flowcode, so it doesnt use the same SQL structure that we are used to.

Thanks,

Samuel

Link to comment
Share on other sites

Under the hood this will be an ECMA expression...  However, I expect that we are quoting any static value that is entered in, so putting the value undefined in the field probably results in an expression som_var == "undefined"

Now I am not sure this will work but try entering the following value into the field  &[undefined] and that might work, although just a guess, its something to try.

 

Gerry

  • Like 1
Link to comment
Share on other sites

The progressive capture is a javascript front end engine. It does not use any flowcode scripts or serverside mechanism (that is the BPM).

So when you are testing to see if value exists you have to use javascript reserved word undefined. You can do this by just typing in undefined in the box. To test for empty value, where the value (variable) exists but it is just blank, just leave the value box empty.

The front end progressive capture engine might set all values to empty when not set by the user, so you might just need to test for empty values instead of undefined.

Cheers

Capture.PNG

  • Like 1
Link to comment
Share on other sites

So to make testing this easier i have just added a "Is Set" and a "Is Not Set" operator. When selected the value field will be disabled as you are just testing the presence of the variable and if it has a value. So expect to see this option soon once its gone through beta, until then use the above.

Cheers

Capture.PNG

  • Like 1
Link to comment
Share on other sites

Hi Neil / Gerry,

This is awesome! I will try out the current workaround. Now we could do different things with forms, where questions are answered / are not answered would take it down a different route. Or within the BPM - where an external ref is not set then create a human task to remind us to set it for example.

Many thanks, i'll keep an eye out for this update :D

Samuel

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...