cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Question - Always make at least one node

0 Kudos

Quick mapping question that I can't figure out.

I have a UDF that takes some arguments and returns true/false depending on the values. For each True value, I want to make destination node <access>. This works fine (see screenshot). However, if my UDF results in False for every value in the queue, I still want one <access> node to be created. I have tried to accomplish this in various ways (if/then/else, another UDF that looks at all values of the queue etc), and I keep messing up contexts etc. Probably something simple I am overlooking.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor

Hi,

Instead of the createIf, just use ifWithoutElse and then mapWithDefault afterwards.

Testing with all false

Regards,

Mark

Answers (1)

Answers (1)

Thanks Mark. This did the trick. I have some other values that are now inaccurate (coming from wrong context), but that appears to be another issue that I will work out. Thanks!