If parselookup with \like\" operator"

  • 30 August 2017
  • 6 replies
  • 8 views

Badge +1

Hi,

i got a form from a colleague which is on vacancy.

This form includes a formula like this:

If(parseLookup(uiSession2A) == "Lesson1" || parseLookup(uiSession2A) == "Lesson2"
|| parseLookup(uiSession2A) == "Lesson3",
"Please make sure to select two different Sessions for Session I and II, should this already be the case, please ignore this message.", "")

I have about 20 lessons (and the name is not lesson but a real title). Now i want to achieve a parseLookup like:

If(parseLookup(uiSession2A) like(or match or something) "Lesson*", 
"Please make sure to select two different Sessions for Session I and II, should this already be the case, please ignore this message.", "")

Is this possible?

Thanks in advance

Stephan


6 replies

Badge +9

You can write like these

1. If(contains(parseLookup(uiSession2A),'Lesson'),'Please make sure to select two different Sessions for Session I and II, should this already be the case, please ignore         this message.', ' ')

2. If(startsWith(parseLookup(uiSession2A),'Lesson'),'Please make sure to select two different Sessions for Session I and II, should this already be the case, please ignore     this message.', ' ')

Badge +1

Great. Thanks for your help.

Can i also make else statements?

If 

else

or 

if

if

else?

Gets a bit complicated but i would rather only use 1 calculated value instead of 3.

Badge +9

Yes you can also make else statements. Try it out.

Badge +1

I tried it like this:

Formula Builder

If(parseLookup(uiSession2C) == "I'm the trainer of one of those sessions","", "Please make sure to select two different Sessions for Session IV and V, should this already be the case, please ignore this message.")
Else If(parseLookup(uiSession2C) == "Taskforce", "A participation is only possible, if you received an invitation by E-Mail. Should this be the case, please select the same Session for Session IV, otherwise your participation won´t be possible.", "")

But when i try to open the preview it just shows a blank screen.

Badge +9

If(startsWith(parseLookup(uiSession2),'Lesson'),'text1', If(startsWith(parseLookup(uiSession2C),'Session'),'text2'),' ')

Replace 'Lessson' and 'Session' with your matches and also replace 'text1', 'text2' with your text information.

Badge +1

Thank you for your quick help. This worked. Now i don't have to use "rules" to hide if something other is selected.

Reply