Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I force an error/warning, when a "select in field" does not select any data?

Can I force an error/warning, when a "select in field" does not select any data?

I have a button that selects an amount of days.

The amount of days is in a small list.

I like to press the button and do a subselect based on the amount of days.

In principal it works, but if there is no selection match, it shows all the data.

I would like to indicate that no records where found for the select.

Thanks.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Another option to what Jagan says is to use a conditional so the button will only appear when some selection is done in the field "Days", so there is no possible error, since the user will not see the button until he makes a selection in the fiedl "Days". Go to the button properties, Layout tab, set Show to Conditional and write the following expression:

GetSelectedCount(Days) = 1

That means that the button will only show up when there is only one day selected in the field Days.

Hope that helps.

Miguel

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try using the function

GetSelectedCount(FieldName)

returns > 0  when any values are selected.

Use this in If condition like this

If(GetSelectedCount(FieldName) > 0, 1, 0)

Regards,

Jagan.

Miguel_Angel_Baeyens

Hi,

Another option to what Jagan says is to use a conditional so the button will only appear when some selection is done in the field "Days", so there is no possible error, since the user will not see the button until he makes a selection in the fiedl "Days". Go to the button properties, Layout tab, set Show to Conditional and write the following expression:

GetSelectedCount(Days) = 1

That means that the button will only show up when there is only one day selected in the field Days.

Hope that helps.

Miguel

Not applicable
Author

Thanks.

I now have a text box, which only shows when my selection on days does not return a value.