need to combine if statements in the formula

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

need to combine if statements in the formula

Seth
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/b8c20bbf-b0cb-43b7-9bd0-9cf5a570a28an%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: need to combine if statements in the formula

Jarosław Kowalewski
Hi,

Let me know if it works for you.

//Jarek

pt., 10 lip 2020 o 22:48 Seth Parkhurst <[hidden email]> napisał(a):
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/b8c20bbf-b0cb-43b7-9bd0-9cf5a570a28an%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAHFpwcV51EK2C6cwZEYKPbCeHcjZrcVSNNtOs9vC4qmzWVLSxw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: need to combine if statements in the formula

Seth
That got what I needed thank you.

On Saturday, July 11, 2020 at 3:28:46 PM UTC-5 Jarek wrote:
Hi,

Let me know if it works for you.

//Jarek

pt., 10 lip 2020 o 22:48 Seth Parkhurst <[hidden email]> napisał(a):
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/b8c20bbf-b0cb-43b7-9bd0-9cf5a570a28an%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/c9706264-5a86-4d7d-bd59-751c7f599a57n%40googlegroups.com.