Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ashish_2511
Creator
Creator

Lock/Unlock a field depending on selections in another field

Hi Community

I've two fields in list boxes - Product and Region.

My requirement is to force users to select a product prior to selecting a region.

For this I guess I've to lock the field region when there is no selections in product and then unlock it as soon as selection(s) is made on Product and repeat.

Please advise a way to achieve this.

*** I don't want to show/hide Region based on selection in Product.

*** I don't want to Hide the Region field with a text object.

Thanks! in advance

-Sneh

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Try this

I have added on trigger

Best Regards,
KC

View solution in original post

17 Replies
YoussefBelloum
Champion
Champion

Hi,

1 solution comes to my mind:

Create a conditional display on the second listbox like: Getselectedcount(field1)<>0 //this will show the second listbox only if you make selection on the first one.

Also, create a textbox to show message like: SELECT A VALUE ON FIRST LISTBOX with conditional display like: Getselectedcount(field1)=0 //this will show this textbox only if you don't select a value on the first listbox

Or anoher solution would be to write this expression on the second listbox: =if(GetSelectedCount(field1)<>0,field2)

nagaiank
Specialist III
Specialist III

A sample solution is attached.

shiveshsingh
Master
Master

I guess, you have attached the wrong QVW

shiveshsingh
Master
Master

I think, he doesn't want this solution, no hiding of object

ashish_2511
Creator
Creator
Author

Thanks for the reply.

I've already tried this. My client doesn't want this.

jyothish8807
Master II
Master II

Try this app:

I have used two list box for region. One in read only state.

Br,

KC

Best Regards,
KC
YoussefBelloum
Champion
Champion

nice one !

ashish_2511
Creator
Creator
Author

Just a dummy dataset, no UI stuff.

but others Could use this dataset to provide their solutions.

ashish_2511
Creator
Creator
Author

thanks for your reply.

I've also reached till this point but could you do some miracle to clear off the Region selection when product is cleared?