AnsweredAssumed Answered

Remove last character if it equals "|"

Question asked by toby91 on Oct 17, 2018
Latest reply on Oct 18, 2018 by toby91

Afternoon, hope everyone is having a good day.


Quick question, I have a requirement to do an export from FileMaker for a few questions/details for one question I have been asked to combine into one field (as there are multiple answers) and separate via pipe deliminator, so I created a calculated fields as follows:

 

If ( IsEmpty (Q3a); ""; "1" & "|" ) & If ( IsEmpty (Q3b); ""; "2" & "|" ) & If ( IsEmpty (Q3c); ""; "3" & "|" ) & If ( IsEmpty (Q3d); ""; "4" & "|" ) & If ( IsEmpty (Q3e); ""; "5" & "|" ) & If ( IsEmpty (Q3f); ""; "6")

 

The only issue is if 3f is not answered the field ends in a pipe eg. 1|4|5|

 

How can I alter this to say if field ends in | remove it??

 

Thanks in advanced.

Outcomes