Skip to main content
Inspiring
Apr 10, 2022 1:48 AM UTC
Question

Multipledropdownfield

Hi,

I have a Multipledropdownfield where users can select multiple items.

Based on the user's selection I have to update the value in another field.

When the users un-select all the items and when I check the value which I am storing in the local variable, is not showing as null if I check using 

isnull(selectedIds)

6 replies

gopalk2865
Participating Frequently
Apr 10, 2022 3:19 AM UTC

Hi, looks like your local variable is not getting updated. Can you share your code with us?

stefanhelzle0001
Brainy
Apr 10, 2022 8:19 AM UTC

isnull checks explicitely for a NULL value. Try a!isNullOrEmpty().

Inspiring
Apr 12, 2022 12:54 AM UTC

Thank you so much. I was able to solve the issue with your suggestion.

harshitb6843
Brainy
Apr 10, 2022 1:32 PM UTC

Basically what you have to do is to set the dropdown 2 variable value to null when the user de-select all the items from the dropdown 1. As Stefan suggested, you can use that updated function to check for both, null and empty. And to make it better, create an expression rule and use it to check for null. So later, if you want to treat any other value as null, then you can just add its logic in the same expression rule. 

Inspiring
Apr 12, 2022 12:54 AM UTC

Thank you so much.

daisym0005
New Participant
Apr 18, 2022 5:30 PM UTC

Please try make use of refresh Variable to store value and change on based on N value change.