CoopperBackpack 32 Posted March 24 Report Share Posted March 24 Hi, I have several fields in the table with the Text(255) data type and need to concatenate these values in the Formula field as comma-separated values. The formula is simple as looks like this: The issue is that in some records some vales are blank an the output has extra commas: How to remove them? Quote Link to post Share on other sites
0 CoopperBackpack 32 Posted March 24 Author Report Share Posted March 24 Just sharing the solution in the Question&Answer way. Maybe it is helpful for some forum members. This formula helped to remove extra commas from the string: REPLACE(LTRIM(RTRIM(REPLACE(REPLACE(REPLACE(REPLACE(([@field:field_1] + ',' + [@field:field_2] + ',' + [@field:field_3] + ',' + [@field:field_4] + ',' + [@field:field_5]), ',', '><'), '<>', ''), '><', ','), ',', ' '))), ' ', ',') The output is the following (Formula_1 field): sandy159 1 Quote Link to post Share on other sites
0 sandy159 16 Posted April 1 Report Share Posted April 1 Thank you for sharing this @CoopperBackpack! I have been trying to utilize this formula on the DataPage as well, however seems that there are some limitations and it works in the Table formula only. Here is alternative SQL formula that I have found. It can be used in a Calculated field/value on the DataPage: COALESCE( NULLIF([@field:A],''), '') + COALESCE(', ' + NULLIF([@field:B],''), '') + COALESCE(', ' + NULLIF([@field:C] ,''), '') + COALESCE(', ' + NULLIF([@field:D],''), '') Regards Quote Link to post Share on other sites
Question
CoopperBackpack 32
Hi,
I have several fields in the table with the Text(255) data type and need to concatenate these values in the Formula field as comma-separated values.
The formula is simple as looks like this:
The issue is that in some records some vales are blank an the output has extra commas:
How to remove them?
Link to post
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.