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
3 replies
Subscribers
7 subscribers
Views
2523 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I'm looking for a simple, clean way of displaying a 'percentage complete
adrianu
over 12 years ago
I'm looking for a simple, clean way of displaying a 'percentage complete' for a CDT using a progress bar. The CDT has X number of attributes that need to be populated with data to be considered 100% complete. I believe I just need to interrogate those attributes, determine if they contain data and then do the division manually in an expression rule. Are there any built in functions to accomplish this or has anyone had success with this scenario?...
OriginalPostID-41268
OriginalPostID-41268
Discussion posts and replies are publicly visible
Parents
0
Sathya Srinivasan
Appian Employee
over 12 years ago
Pretty interesting use case. These are the two ideas that I can think of. The quick and dirty way is to convert the CDT into TEXT and then count the number of "=," which is there when a value of the CDT is null and use this as the total number of empty elements. Evaluate this against the total number of elements in the CDT and you should get the number. You can count the number of "=" to do this dynamically as well - just in case the CDT structure changes. Note: I am assuming all elements are required in your use case. The second (and probably a more reliable way) is to use TOXML() to convert the CDT into XML and use expression to find out number of empty nodes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Sathya Srinivasan
Appian Employee
over 12 years ago
Pretty interesting use case. These are the two ideas that I can think of. The quick and dirty way is to convert the CDT into TEXT and then count the number of "=," which is there when a value of the CDT is null and use this as the total number of empty elements. Evaluate this against the total number of elements in the CDT and you should get the number. You can count the number of "=" to do this dynamically as well - just in case the CDT structure changes. Note: I am assuming all elements are required in your use case. The second (and probably a more reliable way) is to use TOXML() to convert the CDT into XML and use expression to find out number of empty nodes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data