How can I get Menu Click event?

I need to display options in Dropdown dynamically, Here I have 2 menus means 2 views.

If Dashboard menu A is clicked then value 1,2,3 will show in the form dropdown and if the user clicks on menu B then the value should be 4,5 and 6.
Same table and same column(Enumlist)

I need a clicked View value e.g. if the user clicks on View A then I need that value “A”.

Any suggestions would be great. Thanks :slight_smile:

Hi @rrhirani,

I presume by menu you mean views. Also based on your description you have the two views A and B on the same table and you are using forms to select those drop downs.

If so, please explore if following approach helps you.

If A_Form is the form view corresponding to the Vietw A and B_Form is the view corresponding to the View B , then in the dropdown field’s valid_if you may have an expression something like

IFS(CONTEXT(“View”)=“A_Form”,{1,2,3},CONTEXT(“View”)=“B_Form”,{4,5,6})

The approach mentioned above uses CONTEXT() expressions. You may wish to refer to following article on CONTEXT() function just in case you have not

4 Likes

@Suvrutt_Gurjar : First of all, many thanks for your perfect solution. it’s working like a charm!!
and Yes, I meant menu means View. I’ve edited my question so nobody gets confused. Thanks a lot for giving me CONTEXT() function idea :heart_eyes:

2 Likes

Hi @rrhirani,
Thank you for your update. Good to know the approach works for you.

1 Like