kpcollier Posted April 11 Report Share Posted April 11 I have this basic table formula: IsNull([@field:Section_String], '') + ' ' + IsNull([@field:Manuf_String], '') + ' ' + IsNull([@field:Category_String], '') + ' ' + IsNull([@field:SubCat_String], '') + ' ' + IsNull([@field:Description], '') + ' - ' + IsNull([@field:Finish], '') However, if one of the fields is null, the space is still there. This leaves a double space in the middle of the value. Anyone have any ideas how to get rid of the space following a field if it is null? Quote Link to comment Share on other sites More sharing options...
0 kpcollier Posted April 11 Author Report Share Posted April 11 I removed the IsNull from each field and wrapped the whole formula in a couple of replace() method. replace(replace(replace(([@field:Section_String] + ' ' + [@field:Manuf_String] + ' ' + [@field:Category_String] + ' ' + [@field:SubCat_String] + ' ' + [@field:Description] + ' - ' + [@field:Finish]),' ','<>'),'><',''),'<>',' ') Since the value would just be blank if the field is empty anyways, IsNull isn't needed. Then, the replace method will make any double/triple spaces into a single space. Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted April 12 Report Share Posted April 12 Hello @kpcollier, I believe that there is one more option to delete extra spaces, commas, etc. by using the combination of NULLIF() and COALESCE() functions. kpcollier 1 Quote Link to comment Share on other sites More sharing options...
Question
kpcollier
I have this basic table formula:
IsNull([@field:Section_String], '') + ' ' + IsNull([@field:Manuf_String], '') + ' ' + IsNull([@field:Category_String], '') + ' ' + IsNull([@field:SubCat_String], '') + ' ' + IsNull([@field:Description], '') + ' - ' + IsNull([@field:Finish], '')
However, if one of the fields is null, the space is still there. This leaves a double space in the middle of the value.
Anyone have any ideas how to get rid of the space following a field if it is null?
Link to comment
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.