Multi-Field Formula to replace 0s with Hyphen
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In my workflow, the last thing I do before I export is create a difference column. The problem I am running into is when I export, records with no differences populate the difference column with a "0". I want to replace these with a hyphen instead as its easier on the eyes.
I currently have the difference field selected in my configuration and the expression I am using is:
if [_CurrentField_] =0 then "-" else [_CurrentField_] endif.
This expression works but now my output shows blanks instead of the hyphen. Any ideas? am I approaching this the wrong way?
Thanks, community.
- Labels:
- Best Practices
- Common Use Cases
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Your fields must be strings to contain "-" as their value, but your formula indicates that your fields are numerical value data types. Set all relevant fields to string data type and update your formula to if [_CurrentField_] = "0" then "-" else [_CurrentField_] endif.
