I'm looking for a simple, clean way of displaying a 'percentage complete

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
  • 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.
Reply
  • 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.
Children
No Data