CustomString: how to to this on grid view and document templates

In my CustomString widget in a data view I compose a string from two attributes: 'attribute1 (attribute2)'. I would like to have the same output on: a. a grid view in a column b: a document template. Is there any way to have this result?
1 answers

The short answer is, I wouldn't do that. While adding this sort of widget in a single data view is OK, adding a calculated attribute or a custom string into a template grid will fire your source microflow for every row in the table, which can be a performance hit.

Instead, I would add a new attribute to store this concatenated value in your domain model. Do not add the new attribute to the data view, but add an action in your Before Commit microflow to set the calculated value to this new attribute. That way, you do not run a microflow multple times, and you can easily add the new attribute to your data grid or document template.