27
Views
2
Comments
Switching messages according to icon name

Hi, everybody!

Please, could you help me with a basic situation?

I have a form with several questions where are displayed 3 answers.

For each question I have an interrogation icon that when executed the onclick event it should run a switch action where it would be tested wich icon were selected and show a different message. I have named the icons like q1, q2 ... q16, and I would like to define the switch conditions based on icons names. How can I do it?

Thanks a lot!



2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Gabriel,


I tried to create a sample app as per your use case.

Check this: Demo Screen


PFA - includes the .oml solution


Hope this helps you!


Regards,

Benjith Sam

IconMsgTask.oml
2026-02-26 06-29-24
Rahul
 
MVP

Hi Gabriel Motta,

You can take one input parameter in client action like(Inp_IconName) and when you call this action on icon provide icon name accordingly.

after that on switch condition you can provide condition 

1. Inp_IconName="Q1" 

 2. Inp_IconName="Q2" 

 3. Inp_IconName="Q3"


and take one local variable like  message and set message on this variable according to condition

and show you message.


Hope this will help you.

Regards

Rahul Sahu.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.