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

Recommended Posts

  • Newbies
Posted

Hi all

I am writing a new database where i am using check boxes for all the people that have are to read an entry.

What i want to do is find a way to automatically uncheck their name from the list using a script - does anyone know how to do this???

regards

paul

Posted

The solution supplied is pretty good because it considers scenarios such as names contained within other names. When more than one name is checked, they are stored as a return-separated list. For example:

John

Bob

John Mark

George

If you try to remove "John" from the list without adding leading a trailing returns (as done with the formula provided), the list will look like this:

Bob

Mark

George

The return characters make the search criteria unique.

However, there are two issues not considered in the formula provided.

First, you should replace the name surrounded by returns (¶John¶) with a return character (¶) instead of just nothing (""). Otherwise, the name above and below will be placed on the same line (no return character between them) and disappear from the checkbox formated field.

Second, you want to clean up your return-separated list by removing the leading and trailing returns you added. These returns are added so every value in the list has a return before and after. They can be removed many ways. I am providing the simplest code because the list just contains names.

So, here is the fixed formula you can place in the Set Field step:

LeftWords(Substitute(¶ & test::checkbox & ¶ ; ¶ & test::Name & ¶ ; ¶); 999999999)

The LeftWords function removes the leading and trailing returns.

Posted (edited)

Oh right i forgot to substitute for pilcrow :

But.. the left words thing -- really nice way of removing the trailing and leading pilcrows, i've never seen that before -- thanks a million for that one.

Thanks for picking up John

Edited by Guest

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