By rick altman
I have a field that receives a bunch of first names from a portal, thanks to the List function. The result might look like this:
Alice, Bill, Chuck
However, I need for the list to read:
Alice, Bill, and Chuck
I need to find the last comma in the text and add an "and" to it. I have been messing around with the Position function stuffed inside of a Substitute function, but I can't get it right. Can someone help?
By tom robinson
I have a script that loops thru [ go to next ] tab designated fields on a layout and generates a substitution list as such ;
"[\""&Get ( ActiveLayoutObjectName ) & "\"; " & Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName )&"];"
appending "Substitute(report flow data::report" and ")" at end
(report flow data:: report) being a template loaded with "key words"
Substitute(report flow data::report
["rdate"; report flow data::flowtest_date];
["rgpd"; report flow data::gallons per day;
["syaddress"; selected system::c_NameAndAddress];
the key words to be substituted are the individual fields given name and for easy remembering that fields tooltip as well , is it possible to script edit the fields name thus editing the "key word"
This custom function "substitute data" substitutes with the scripted text chunk pasted into the function.
how to utilize variable $$sublist in place of text chunk
apparently one can only substitute text ? it appears that a calculated number doesn't work.
English is not my native language and I'm using FileMaker in a other language so some spelling/translation errors might occur.
I have searched and tried to find a solution for this but couldn't find any. I have a text field, let's call it "Table::Colors", where users either write values manually or paste values. Most of the time the user paste in values. I want to make a script/calculation that changes the pasted value so it becomes correct. --- The user usually paste something like this: "1Green 2Dark blue 10Red3 15Yell0w Purple4" --- I have a script that runs when the user enters/exits the field that looks like this: "Insert text [Table::Colors; Substitute(Table::Colors;["¶";", "];["1";""];["2";""];["3";""];["4";""];["5";""];["6";""];["7";""];["8";""];["9";""];["0";""])" I also have an auto-enter calculation on the field itself and have set it to replace existing value. It looks like this:
"TextFormatRemove(If(Right(Table::Colors;2) = ", " ; Left (Table::Colors ; Length(Table::Colors) - 2 ) ; Table::Colors ))" When the user exits the field the value now looks like this: "Green, Dark blue, Red, Yellw, Purple" --- However I want it to look like this: "Green, Dark blue, Red3, Yell0w, Purple4" Basically I want to remove numbers in the beginning of each line but not the numbers that are in the middle or last. Is there a good way to do this?
In the address section of my database, when you select either Canada or USA it provides a list of relevant ‘Provinces’ or ‘States’ in the Province/State field. Currently the provinces/states are written in full but I would like that once a selection is made, the field automatically inputs the abbreviation - ex. someone selects ‘Saskatchewan’ and it auto-enters/replaces it to ‘(SK)’ on commitment.
I managed somewhat to achieve this using the substitute function but only for one entry, I was not able to enter multiple substitutions – ex. Substitute (Province ; “Saskatchewan” ; “(SK)”). Is there a way to enter multiple substitutions as a conditional value? Is this the best way to go about it?
FYI, my address section is linked to conditional value lists with the following fields:
Country (list of countries)
Prov/State (list of provinces and states)
Prov/StateAbb (list of provinces and state in abbreviated form)
Thank you in advance for your help!
Hi All, I have this fairly simple field, it's a calculation that returns a list, and it works well:
If ( IsEmpty ( IP Addresses::IPv4 Address ); "No Static IP"; List ( IP Addresses::IPv4 Address ) ) However, in the resulting list that displays, I'd like to substitute the carriage returns with commas, and I've come up with this bit of code to make the substitution:
Substitute ( IP Address Display; "¶" ; ", " ) Is this correct? If so, where do I place the substitute statement? Will it go into the same calculation I use to define the field, or do I have to put this into a brand new field of its own?
Thanks in advance,