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 6583 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a case function that is not working properly. It only picks up the first case.

Case field >0, field;

field 2 >0, field &","&field2;

and so on until I go to six levels

it is a bunch if names. that I want to put together with commas,

I will pick up the first line but not get any of the others.

Thanks in advance

Randy

Posted

Case(

not IsEmpty ( field ) ;

Case(

not IsEmpty ( field2 ) ; field &","& field2;

field

);

""

)

BTW: the same result can be obtained without a Case function:

Substitute ( Trim ( field & " " & field2 ) ; " " ; "," )

and for six fields:

Substitute ( Trim ( field & " " & field2 & " " & field3 & " " & field4 & " " & field5 & " " & field6 ) ; " " ; "," ) :)

Posted

Yet another approach is a series of Case statements:

Case( not IsEmpty( field ) ; field & ", " ) &

Case( not IsEmpty( field2 ) ; field2 & ", " ) &

Case( not IsEmpty( field3 ) ; field3 & ", " ) &

etc

Posted (edited)

Hi Randy,

Yeah, the reason it doesn't work is because a case statement stops evaluating after one of the tests evaluates to true.

If you want it to work, list the tests backwards in order.

Edited by Guest
Posted

Substitute ( Trim ( field & " " & field2 & " " & field3 & " " & field4 & " " & field5 & " " & field6 ) ; " " ; "," )

I think you meant:

Substitute ( [color:red]TrimAll ( field & " " & field2 & " " & field3 & " " & field4 & " " & field5 & " " & field6 ; 0 ; 0 ) ; " " ; "," )

Posted (edited)

if those fields contain spaces, try this one:

Substitute ( [color:orange]TrimAll ( Substitute ( field & "|" & field2 & "|" & field3 & "|" & field4 & "|" & field5 & "|" & field6 ; [" " ; "^"] ; ["|" ; " "] ) ; 0 ; 0) ; [" "; ", "] ; [ "^" ; " "] )

Edited by Guest
TrimAll as comment said !
Posted

When I put this calc in the space between every word it puts a comma, I just want it between the full names.

Substitute(TrimAll ( Child 1 Calc & " " & Child 2 Calc & " " & Child 3 Calc & " " & Child 4 Calc & " " & Child 5 Calc & " " & Child 6 Calc; 0; 0);" "; ", ")

Result is Randy,Koonce,chase,pinkerton, and so on.

Thank you for the answers.

Posted

Try this one posted by daniele just above:

Substitute ( TrimAll ( Substitute ( field & "|" & field2 & "|" & field3 & "|" & field4 & "|" & field5 & "|" & field6 ; [" " ; "^"] ; ["|" ; " "] ) ; 0 ; 0) ; [" "; ", "] ; [ "^" ; " "] )
Posted

If you use your real field names (i.e. LastName, FirstName instead Field 1, Field 2), it will not only help us to understand what you are wanting to accomplish, most of the times the Replies will use them too, thus, making it easier for you to read and understand the answers.

A great thing about using Forum is that you can attach files, and this often really speed up the process of getting a resolution of your problem.

Lee

Posted

Just a clarification: when Genx said "the reason it doesn't work is because a case statement stops evaluating after one of the tests evaluates to true" he was referring to the original poster's calc. Some people might get confused because his response followed my calc, which does work, although it's not quite as interesting as Daniele's.

Posted

Hi Tom,

You have made a good point here.

We all need to be more careful when replying to posts. In fact, I never use the Quick Reply (bottom of the page in the Tread), but instead use the Reply Button in the post I'm responding to. This ensures that the reponse will line up with the proper posts.

Otherwise, the responder needs to acknowlege the person's post by putting the name of the poster in the first line (i.e. Hi Lee)

[color:blue]BTW Tom, I don't believe I have ever seen a post of yours that wasn't spot on.

Lee

Posted

Thanks for those kind words, Lee. :woohoo:

I'm one of those who does use the Quick Reply, however. The main reason is that when I use the Reply button, I can't see the thread anymore. Therefore I don't pay that much attention to who is responding to who in the message header in general. As you say though, it is nice to have that extra bit of info ("Hi Lee").

Now back to your regularly scheduled topic.

Posted

Hi Lee and Tom :

Hehe, yeh I have a habit of doing that, but the main reason lately i haven't been hitting the reply button is because the page takes like 15 seconds to finish loading... I mean it loads, then it reloads, and then it reloads again, it's quite frustrating..

I wouldn't mind a "quick reply" button at the end of each post so you could click it, it could set the variable as to whoever your replying to and then just send you to the quick reply box.

Posted

I can't see the thread anymore

Yeah, I agree. I usually have to us the [color:orange]Click to Review other posts in this topic, and It would also be nice to have the person we are replying to show in the header like the Subject does too. The drawback using this options is that the Version and Platform Info isn't there.

like 15 seconds to finish loading

This had been happening to me also. I'm hoping that it will start getting faster once the Software change over is complete.

I have removed a few double posts by the same person which I would contribute to "Add Post" multiple times because of the lag.

Thanks for your guys input.

Lee

Posted

Ok here is the actual field names on the calc.

Substitute ( Trim ( Child 1 Calc & " " & Child 2 Calc & " " & Child 3 Calc & " " & Child 4 Calc & " " & Child 5 Calc & " " & Child 6 Calc ) ; " " ; ", " )

This Calculation puts a comma between each word in the child 1 calc is the result of a persons fist name and last name. so it should be Randy Koonce but what I see is Randy, Koonce, and so on.

thank you for the help.

Posted

As i said before...

Try this one posted by daniele just above:

i.e.

Substitute ( TrimAll ( Substitute ( Child 1 Calc & "|" & Child 2 Calc & "|" & Child 3 Calc & "|" & Child 4 Calc & "|" & Child 5 Calc & "|" & Child 6 Calc ; [" " ; "^"] ; ["|" ; " "] ) ; 0 ; 0) ; [" "; ", "] ; [ "^" ; " "] )

This topic is 6583 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.