November 3, 200619 yr Newbies 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
November 3, 200619 yr Set Field[YourField ; Substitute(¶ & YourField & ¶ ; ¶ & TheAccountName & ¶ ; "") ]
November 3, 200619 yr 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.
November 3, 200619 yr 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 November 3, 200619 yr by Guest
Create an account or sign in to comment