Expand my Community achievements bar.

Valueformat - Single reference for all available options

Avatar

Level 2

I write custom code into text mode all of the time, but I frequently find myself guessing and playing "cat and mouse" with the valueformat. I usually have to try several different possible options to put into that field before the report returns something meaningful. Is there not a singular reference somewhere that lists out all of the different options for valueformat and their respective restrictions/applications? I feel like this should be somewhere in the documentation, or even the community, but I have been unable to find any such resource. Knowing what options and limitations there are would save me a ton of time just trying to get a report up and running.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

7 Replies

Avatar

Community Advisor

If you do a search on AEL, I think the top three results are about the extent of what documentation is available. e.g.

 

https://experienceleaguecommunities.adobe.com/t5/custom/page/page-id/GlobalSearch#q=valueformat&sort... 

Avatar

Level 2

Thank you very much! This is very helpful. However, most of what I work with is hours. This documentation does not show how to handle hours, but I can see in text mode from default fields that such formatting options do exist. For example, minutesToHoursString is a common one. But that does not seem to work with a custom field. Is there anything more than this out there?

Avatar

Community Advisor

I'm not sure if I heard everything you said, correctly.

 

I think if something isn't working as expected, you should submit a case to the support team.

 

Having said that, I can definitely see that hours formatting might not work because that's not a type you can assign to a custom field. i.e. if you can only tell your custom field to be a date, currency, numbers, or simple text -- not hours -- then you might of course also not be able to format a specific type of hour formatting. (Other users get around this by recalculating their number manually to be hours rather than minutes.)

Avatar

Level 2

Allow me to clarify. For example, I have a custom field on a project where we put a high-level initial estimate for the scope of the project called the "Charter Hours." I want to be able to compare the initial estimate, the "Charter Hours," to the Planned Hours and Actual Hours in the end (so that we can make better initial estimates in the future). So, I have a report that has columns with the custom "Charter Hours" alongside the Planned Hours and Actual Hours. The Planned Hours and Actual Hours display as hours, but the Charter Hours just display as a number (in hours). I would love to have it say, for example, "100 Hours" rather than "100." Of course, I can use CONCAT and put this in there as a string, but then I am unable to have the word " Hours" display when I aggregate this data via a grouping. It just looks a little unprofessional, but I can't seem to find suitable solutions for this.

 

This was just one recent example, but I have many more cases for representing custom fields or custom expressions a hours. Thanks for your help!

Avatar

Community Advisor

yep, that's exactly what I would suggest (concat).

Avatar

Level 2

Thank you for your help here. Have you been able to get CONCAT to work on aggregations similarly to non-aggregated rows?

Avatar

Level 2

@skyehansen, just following up on the question above. Have you found a way to make it work with by using CONCAT in an aggregation valueexpression?