Display Substring of a field
((I had posted this on the pega forums and not the PDN section, so I am posting here as there are a lot more answers to be found here))
I am looking to find a function that will enable me to extract a field and place it on a report, but I am only wanting to display a partial piece of a lengthy string. i.e. in a report where you have the tabs along the top - content,drilldown,organize....history - If I select the Dilldown tab where I can select the fields I need displayed with a caption, I assume that in the HTML property I should be able to use a function to perform the equvilent of a SUBSTRING feature where it can specify startpossition and length for a field of what to display.(using the magnify icon next to field)
ie Field value = "Start:clientname.location-state" using substring(6,10) will show "clientname" and other varients (len() ) etc?
do I need to write this in Java or is there something already available ?
there was a suggestion from hsoneji :
Try this in HTML Property and apply that to the field column in your report you want format.
String fmtStr = tools.getActiveValue().substring(1, 2);
BUT - I tried that and it did not do anything to the report, but it could have been my misunderstanding on how to implement.
I have not yet figured out how to perform this seemingly simple task. Any help is appreciated.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Keep up to date on this post and subscribe to comments
- SAE (7.2): Passing data to another case- Field Group [Employee] added to view does not display embedded fields
- For a Single Property I need to display three fields two Date Fields and one is Drop down.
- In imported History records, message displays the *name* of a Field Value instead of the *value* of the Field Value
- Editable field displays as Read-only field when defer load is checked
- How to hide/display Field