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
+1
person also asked this
people also asked this
Replies
6 replies
Subscribers
8 subscribers
Views
4005 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is it possible to create Constants at runtime during a process execution? T
aayusha
Certified Senior Developer
over 11 years ago
Is it possible to create Constants at runtime during a process execution?
The use case is to have an excel file with all the details for the constant and creating the same by uploading the file to a process. The process would then take the data from excel file to create the constants.
Thanks...
OriginalPostID-94430
OriginalPostID-94430
Discussion posts and replies are publicly visible
0
Elamparithi Kalyanasundaram (Parithi)
over 11 years ago
Hi,
As far as I know, there is no way to create constants programmatically
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
Can't you use a database to store these values and refer from the db? Your end result will be the same. I think for such dynamic behavior where the data is externalized and volatile, an external persistence method would be a lot more scalable and easier approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aayusha
Certified Senior Developer
over 11 years ago
Hi Sathya
What I am trying to achieve is to create constant at runtime. Let say suppose you have to create dropdowns, checkbox and radio buttons on screens. The best way is to give Labels and values by constants. Now what I am trying to achieve is to have all the constants defiend in an excel file with all the details (constant name, value, multiple, description) and then creating a process which would create constants for me rather than going for a usual approach of creating constants one by one.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
With the example you've provided, I would recommend using the database as the best approach. You can populate drop downs directly from a database using query rules. You should be able to achieve your requirement using a single table that contains a key to identify the 'constant' you're trying to define, a label column that holds the label values and a value column that holds the corresponding values.
Define a CDT to map to this structure and use query rules to pull the data you want.
Now, you can build a process to access/store or update these constants rather than maintaining an excel document which is prone for error when multiple people end up maintaining multiple versions. With the DB approach, you can maintain a single source of truth.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aayusha
Certified Senior Developer
over 11 years ago
Thanks Sathya
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narayanar
over 9 years ago
I have a similar requirement where I need to maintain all the constants in a property file that I will need to read and use that to update constants. And this needs to be developed as a stand alone java component that needs to run out of Appian. Something that can be run during deployment. It can use public Appian api to connect to Appian server and update the constants on the server automatically. The idea behind doing this is to avoid making constant updates manually during deployment. We have a lot of web services that we use whose urls are currently referred from constants, and it is getting tedious to keep up with the changes on those. So if we can manage using a property file, we can keep it at one place.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel