Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
6 subscribers
Views
2603 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
There are several drop-downs in my current application. We need an Admin sc
phanibabuk
over 9 years ago
There are several drop-downs in my current application.
We need an Admin screen to add/modify/delete the values in all these drop-downs.
Allowing an admin to add new values to a drop-down is not a problem.
I’m wondering if the admin wants to modify/delete values within existing drop-downs.
1. What would happen if an Admin tries to delete a value within a drop-down and the current instances in PROD are using that value.
2. What would happen if an Admin tries to modify a value within a drop-down and the current instances in PROD are using that value.
I wanted to understand if the old instances work?
How can this be handled.
I need inputs around this.
OriginalPostID-183051
OriginalPostID-183051
Discussion posts and replies are publicly visible
0
Stefan Helzle
A Score Level 3
over 9 years ago
Are we talking about SAIL? In SAIL drop downs are not happy when the value is not within the choiceValues list. I suggest to build a modified version which handels that und use this instead of the OOTB one.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ChristineH
Certified Lead Developer
over 9 years ago
I recommend adding a status flag in your lookuptables. That way you can inactivate (but not delete) options. Then change your queryrules where selections are made to filter out inactive choices.
That will ensure you don't break processes, but stop certain values from being selected going forward. Just like any relationship model, you don't want to delete as it may break referential integrity.
Hope that helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 9 years ago
Hi Christine,
Could you please elaborate your inputs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ChristineH
Certified Lead Developer
over 9 years ago
Generally, I have drop downs (or lookup data) stored in a DB table (i.e. contract_types_lkup) instead of constants.
That table would have CTID (PK - Sequence), ContractName, ContractNameDesc, Active (Boolean)
The admin user would be able to start a process to manage data. They would pick this table. Then, execute a queryrule to get the data from this table. Allow them to edit name, desc, and flag (via an editable grid) and add new rows. Finally, write the CDT to the datastore.
Then in process, where there is a dropdown to select values. Create a queryrule against the table where active is True. That will allow your users to only select active values at that time.
Is that what you are looking for? Hope that makes sense.
Thanks!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 9 years ago
Hi Christine,
Your inputs have already given me a very good idea.
So, we will not delete any rows in the look up table but only mark Active column to "True" or "False"?
Could you please provide your inputs for the scenario attached?
Appreciate it!!!!!
DD.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ChristineH
Certified Lead Developer
over 9 years ago
If you allow edits, you will lose history, unless you create a history table for the changes. Then you could look up what the value used to be when it was selected based on dates. However, in situations like this, I recommend don't allow edits only changing to active/inactive and adding new.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 9 years ago
Thanks Christine for your inputs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
SANTOSH S KUNDLIK
Certified Associate Developer
over 9 years ago
If you can have these drop down values as Appian constants then you can use Update Constant Smart Service to do add/update/delete constants. I am not sure if older process instances will use latest of older version of constant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 9 years ago
Hi Phani.. in case of any updates, do not update the old one treat them as "Remove" and "Insert" Scenario.. I mean first mark the existing entries active to "false" and then insert new ones in this scenario the old and new instances should get the required values.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel