Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if field selected

Hello Together,

how can I write a textmessage in a textbox box depending on the figured selection ?


According to a psudocode:


if the "General Script Error" Value in the shown Field is selected,

then write "General Error occured" in an textbox,

else write "No Errors"

Thank you very much !

Best Regards,

1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You can achieve that using this code:

=if(index(GetFieldSelections(ERROR_Type_ETL_Process_3), 'General Script Error') > 0,

     'General Error Occurred', 'No Errors')

That will highlight if that value is selected on its own or with others.  You could just use this if you want it to be the only selection:

=if(GetFieldSelections(ERROR_Type_ETL_Process_3) = 'General Script Error',

     'General Error Occurred', 'No Errors')


If you just want to know if it is a possible value, it would be this:


=if(maxstring({<ERROR_Type_ETL_Process_3*={'General Script Error'}>}ERROR_Type_ETL_Process_3) = 'General Script Error', 'General Error Occurred', 'No Errors')


Hopefully one of those options will give you what you require.

Steve

View solution in original post

2 Replies
javier_florian
Creator III
Creator III

Try with this:


=If(ERROR_TYPE_ETL_Process_3='General Script Error', "General Error occured","No Errors")

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You can achieve that using this code:

=if(index(GetFieldSelections(ERROR_Type_ETL_Process_3), 'General Script Error') > 0,

     'General Error Occurred', 'No Errors')

That will highlight if that value is selected on its own or with others.  You could just use this if you want it to be the only selection:

=if(GetFieldSelections(ERROR_Type_ETL_Process_3) = 'General Script Error',

     'General Error Occurred', 'No Errors')


If you just want to know if it is a possible value, it would be this:


=if(maxstring({<ERROR_Type_ETL_Process_3*={'General Script Error'}>}ERROR_Type_ETL_Process_3) = 'General Script Error', 'General Error Occurred', 'No Errors')


Hopefully one of those options will give you what you require.

Steve