need to combine if statements in the formula

8 views
Skip to first unread message

Seth Parkhurst

unread,
Jul 10, 2020, 4:48:26 PM7/10/20
to Orbeon Forms
if($control[contains(text(), 'MB_')]) then replace($ control  ,"MB_","")  else if($ control[contains(text(), 'NA_2')]) then replace($ control  ,"NA_2","")  else if($ control[contains(text(), 'NA_3')]) then replace($ control  ,"NA_3","")  else ''

I am trying to use the calculated value to modify what goes to an alternate control.  Basically one control goes to two data base destinations and should contain the same value.  The answers in the control are set with a prefix to indicate the database destination.  For the first destination I want to remove the prefix and keep the database answer.  But then I need the if statements to continue so that it removes the answers that will be moved to the second database destination.

In short, I need the if statements to not terminate when the first is executed.  I imagine that i need a different operator or need to modify the placement of parentheses? I just do not know the syntax.

Jarosław Kowalewski

unread,
Jul 11, 2020, 4:28:46 PM7/11/20
to orb...@googlegroups.com
Hi,

Let me know if it works for you.

//Jarek

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/b8c20bbf-b0cb-43b7-9bd0-9cf5a570a28an%40googlegroups.com.

Seth Parkhurst

unread,
Jul 13, 2020, 10:28:18 AM7/13/20
to Orbeon Forms
That got what I needed thank you.
Reply all
Reply to author
Forward
0 new messages