Input dropdown list is dependent on many data

I’ve read a lot of articles already but still have difficulties applying this. Perhaps I can write a topic here that is same to my case:

Just wanted to know:
1. How do I best structure the database
2. Expression to use in this case

I want to create a dynamic dropdown that is based on multiple data types:

2 different Date type that will influence the options:

  1. User’s job level
  2. Paid Time-off

User job level between 0-2 will have different set of paid time-off (paid time-off set A), while job level between 3-7 will have paid time-off set B.

There are different kinds of paid time-off. Set A will only have 1 which is Service Incentive Leave, while Set B will have vacation, medical, emergency etc.

I set my time-off by default at Unpaid. But I want these data types to influence. I initially wanted to setup 2 different static dropdowns which will show-collapse depending on the stated constraints/ data but I reckon it is not the best way as many in this forum have said.

At the moment I am stuck here, but it is not yet filtering according to the Job Level too. And also the list of text is all consolidated in one dropdown row.

Hi there, @janernestgo… if I was doing what you described (assuming I have understood your post correctly), I would do it with option sets… three of them, to be exact.

The first option set would define the job levels.

The second option set would define the PTO categories.

The third option set would define the PTO types, and this option set would have attributes that link back to the other option sets.

Finally, I would have a job level field on the User data type that is tied to the first option set, and I would store a user’s job level in that field.

With those option sets and the job level field in place (making sure the attributes on the third option set have been configured appropriately, of course), your dropdowns would be set up as follows.

Hope this helps.

Best…
Mike

Hi Mike, thanks for your attention. Let me try this one.

1 Like

It seems that the 2nd constraint is not working. The job level in my user database is not a list of text but simply a number (text).

If you are trying to do it exactly how I showed, the job level field on the User data type needs to be linked to the option set that defines the job levels (and the field shouldn’t be a list because I assume a user can only have one job level). Since your job level field is a text field, you will need to delete that field and create a new field that has a field type of the option set.

Right! That’s why the expression is not working for the 2nd constraint. Let me make necessary adjustment.

Hi @mikeloc I tried you’re recommendations. I also changed the job level field from number and aligned it with the option set.

However, the 2nd dropdown (time-off kind) is not clickable. I

Here is the element editor.

Without being able to see the entire set up, it is very difficult to help. For example, the fact that the type of choices in that screenshot is Paid Time-off Type leads me to believe you did not set things up the way I did in my example. So, without knowing exactly what you did, I don’t know why it’s not working.

This topic was automatically closed after 70 days. New replies are no longer allowed.