Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5575 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Good Day to all

Creating a web store data management input screen. to select product categories on the export the result is a calculated field with commas in them

the field categoryids equals the fields CatagoryID1 CatagoryID2 CatagoryID3

the first attempt:

CatagoryID1 & "," & CatagoryID2 & "," & CatagoryID3

gives me

21,,

I need the verbiage for if it is empty don't add the commas.

Posted (edited)

Here is one way ...

Let (

concat = Category1 & " " & Category2 & " " & Category3 ;

Substitute ( TrimAll ( concat ; 1 ; 0 ) ; " " ; [color:red]"," )

)

I notice you don't have spaces as 22, 34, 27 but rather 22,34,27. If you decide you want the space after the comma, just add it after the comma in red. :smile2:

UPDATE: Using Let() here isn't required but 1) it makes it easier to read what is happening and 2) it will be easier if you wish to add fields to the concat.

Edited by Guest
Added update
Posted

Hi LaRetta,

I like your calculation better than the one I use;

Hi pc302, and Welcome to the Forum,

Here is another way,

categoryids (calc, Text result) =

Case(not IsEmpty(CatagoryID1); CatagoryID1 [color:red]& ", "; CatagoryID1) &

Case(not IsEmpty(CatagoryID2); CatagoryID2 [color:red]& ", "; CatagoryID2) &

Case(not IsEmpty(CatagoryID3); CatagoryID3 [color:red]; CatagoryID3)

[color:blue]Note the change in the calculation for the CatagoryID3.

I only posted this so that the new users can see a different way.

Lee

Posted

Substitute( List ( CatagoryID1; CatagoryID2 ; CatagoryID3); "¶"; ", ")

This topic is 5575 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.