05-04-2023 11:31 AM - last edited on 05-24-2023 11:59 AM by JackLacava
Hi,
Is it possible to create a dependent dropdown list using a SQL Table Editor? Example below:
If I select Entity A in the Entity column, I would like PC1, PC2 to be options within the Profit Centre column.
If I select Entity B in the Entity column, I would like PC3, PC4 to be options within the Profit Centre column.
I have tried using 'Selection Changed Server Task' to update a Literal Parameter that I can use as a basis for a Bound List parameter that I am attaching to the Profit Centre column , however this only appears to work after the row has been saved:
I think it may be possible if the user was to save the row after choosing the Entity and then selecting a Profit Centre, but this wouldn't be an ideal user journey.
Thanks,
Mark
Solved! Go to Solution.
05-09-2023 09:45 AM
No, that's not going to work. But you can hide that button and just create yours.
05-04-2023 01:07 PM
05-04-2023 02:55 PM
If I read correctly, he would want the parameter list assigned to the Profit Centre field to update after making a selection in Entity field. I don't think it's possible as I'm not sure how making a selection in Entity field would invoke record level refresh of the STE component. Not sure how what you recommend would look like but now curious!!
05-05-2023 03:49 AM
Cosimo, that's exactly what I'm looking for
05-04-2023 03:26 PM
Hahaha, this is why before responding I should read the whole thing. They I've done that is to move the column from SQL editor back to a combobox and not keep it in the editor itself.
05-05-2023 03:54 AM
That won't work as the SQL table needs to hold multiple entities.
Another thought that I had, is to have a popup dialog when you click new add new row, which allows you to choose the entity and store the selected entity in a literal parameter (and use the literal parameter in the Profit Centre filter). But not sure if that is possible?
05-05-2023 05:22 AM
I always hate to be "that guy", but I fear using a STE for this sort of activity is not the best approach. What you describe (creating a record where field choices are interdependent) is closer to going through a wizard than mass-editing raw SQL rows.
It would probably be better to have a dedicated pop-up with (at least) the basic fields a user has to enter when creating records, which you can control more precisely. You can then provide a STE for reviewing or mass-updating records afterwards, if necessary.
05-09-2023 08:42 AM
Hi Jack
That sounds like a possible solution, however, I'm not sure how I would get a pop dialogue when creating a row? Is it achieved by setting the 'Selection Changed User Interface Action' below to Open Dialog?
05-09-2023 09:08 AM - edited 05-09-2023 09:09 AM
Assuming we are talking about a button (which is what i had in mind, something like "Create New Entity"), yes - and note that there are many "Open Dialog" options to help you manage the relevant popup. You'll also have to set the "Dashboard to Open in Dialog" property to point to the dashboard that will be used in the popup.
05-09-2023 09:12 AM
I was hoping to be able to use the add new record button?
05-09-2023 09:45 AM
No, that's not going to work. But you can hide that button and just create yours.