I have a condition where i wanted to do null check if either of the IDs are null it shoudn't write to database. I am using this code in task output.
remove( wherecontains( or(a!isNullOrEmpty(pv!primaryId)), a!isNullOrEmpty(pv!selected) rule!NV_constructCDT( formId: pv!form.FormId, primaryId: pv!primaryId, secIds: pv!selected, ), ))
Do you have any ideas to optimize this implementation? Thank you
Discussion posts and replies are publicly visible
Your expression rule can simply check for a blank rule input value on either of the IDs in question and return an empty set ({}) as appropriate. There should be no need to bring the "remove()" function into this.
reject(fn!isnull, pv!primaryId) will remove nulls from an array -> pv!primaryId and return the resulting array.