In your script, you need to append the new value to the existing return separated list of values. There are several ways you can do this. Here's one:
If [ IsEmpty ( FilterValues ( YourTable::Feld#2 ; "new value" ) ) ]
Set Field [YourTable::Field#2 ; List (YourTable::Field#2 ; "new value") ]
In place of "new value" you can put whatever calculation expression you need as long as both the If expression and the set field expression use the same calculation. (The If test is to check to see if the value has already been selected in Field#2.)
Thank you for input. I will try it and let you know. Gracias, de nuevo
Hi. Thank you for taking time to answer. Here goes my message again..
Hi. Sorry to bother you. I did what you suggested when creating a script that takes an indication from a field and selecting on a second field (check boxes list value field) but it did not work. I do not know if you understood the question: I have two fields, field #1 is called "Country Regions" and it lists several regions as "US", "US& Canada", "South America",etc. The second field called "Countries" lists ALL the world countries with check boxes next to each country. I can have the script check mark ONLY ONE COUNTRY when I choose on of the regions, but if the region has more than one country, as in "US & Canada", the script only check marks the last country value I set on the script, not both countries (Check mark for US AND check mark for Canada). If I read you correctly, the script you suggested checks on the second field to see if it is empty, if not, it check marks it with the value.It does check mark ONE of the countries, not two or more countries as desired. And what if the second field is already check marked and I want to change the region, I think the script won´t work then.
Mainly, what I want to do is to have the script check mark two or more countries on the second field according to the region a choose on the first field.
thank you again.
The script as written, takes a specified value of one check box, and if checked adds it to the check box values selected in another field without changing any existing selected values.
If you have
US & Canada
In one list. And:
in another and you want a click on US & Canada to select the US value and the Canada value--overwriting any previous value selections in the second field, you could use this script:
If [ Not IsEmpty ( FilterValues ( Table::Field1 ; "US & Canada" ) ) ]
Set Field [ Table::Field 2 ; "US¶Canada" ]
Great, great, great. It worked just as I wanted it. First time I use the "¶" operator. I do not even know what is it called though. Thank you very much.
It's called the "Pilcrow" and in English it's a proof reader's symbol to start a new paragraph. In FileMaker, it's the symbol for a carriage return in calculated expressions such as these.
Hi, PhilModJunk. It's me again taking advantage of your generosity and your time. I have a question: is it possible to do a conditional formatting on a field so it fills in with a different color depending of what others fields show? I was able to make it turn ONE color only. But I need it to turn into 6 different colors. As I said, the condition comes from 6 different fields, not just one field changing its value. Thank you for taking your time to answer me.
You can "stack" multiple conditional format expressions with each specifying a different fill color. If more than one expression evaluates to true, you'll see the last/bottom true expression's fill color applied.
Thank you for your time. I thought so. But since there are 6 conditioning fields, I do not know what color is the one that will show on top or if it will show as a "rainbow". Any way, I will try that and manage around it. Thank you again.
The "top" and "bottom" I am referring to is the top to bottom order of conditional format expressions in the conditional formatting dialog. You can keep clicking the "Add" button to add as many "formulas" here as you need and specify a different color for each.
It worked! Thank you so much.