I tried to follow the logic of the code I was given to just add the field Provider Phone but FM says "the specified field cannot be found," and it highlights thePhone in its first instance.
1. You should NOT use the South-Martian dialect of the FM Calculation Engine …
OK, just two problems:
1. You cannot declare a List() with only one item
2. Substitute() needs a few more parameters; namely, a) what string to replace with b) what replacement string,
But that's just why this syntax is incorrect; the real problem is that you don't need that variable.
The Substitute()/List() Pattern in the variable declarations is to build lists from variable content that comes from several fields, then List() it again (now because that's your desired output format).
If you have a field that goes on its own line anyway (if it does have a value), you don't need that pattern; you can simply add the field reference “ProviderPhone” to the result expression:
List ( theName ; theAddress ; ProviderPhone )
Concatenation is all about joining strings of characters together to make longer strings. You use the "&" operator to accomplish this. For example:
"Peter" & " " & "Anderson" gives the result "Peter Anderson".
You could concatenate your address information in at least two ways.
First I'll do it without the List () function:
ProviderFirst & " " & ProviderLast & ¶ &
ProviderAddress1 & ¶ &
ProviderAddress2 & ¶ &
ProviderCity & ", " & ProviderState & " " & ProviderZip & ¶ &
ProviderPhone & ¶
Here's how I'd use the List () function to insert the same line breaks:
ProviderFirst & " " & ProviderLast;
ProviderCity & ", " & ProviderState & " " & ProviderZip;
One of the advantages of the List () function is that it doesn't add blank lines for empty values. It also looks a little cleaner.
Your original examples also use the List () function to deal with possible blank values within your concatenated full name and city-state-zip.
To my eye, that's a little hard to understand at first glance. An alternative is to use a Case() statement. Here's a possibility for the full name. You may think that it's too verbose -- the choice is up to you:
not isempty(ProviderFirst) and not isempty(ProviderLast) ; ProviderFirst & " " & ProviderLast;
not isempty(ProviderFirst); ProviderFirst;
not isempty(ProviderLast); ProviderLast;
The bottom line is that there is always more than one way to do it. I hope these alternatives help you understand why the List() function is useful and what it does for you.
Ahh I see. Worked like a charm. I'm so happy! You rock!
So I've learned that the little blue box is called a badge and indicates a button. I've been trying to take the Work Address and Personal address buttons and add more to them but when I exit layout they do not show. Also, pushing the button causes the particular address info to be displayed. How can I look to see how the command is worded?
I'm not sure what you are looking for exactly -- but a button can do either of two things: perform a single action or run a script. If you double-click on the button in layout mode, a Button Setup dialog will appear. The bottom portion of this dialog will indicate the action associated with the button. If it's a script, you can view the script by clicking on the script name (which appears below the Button Action).
This is a little abstract -- see attached image for an example, where the button script is called "Navigation Button (destination)".
Hope this helps --
I see now how to go to the button setup. I also figured out that if I want to see what the personal address button does I have to click on that button and then go into edit layout. It's starting to come together I think.
Glad to hear it!
So when I click on the Work address button of the contact starter and go to edit layout, the work address button is set to do nothing. The Personal address button is set to Go To Object and is specified to go to "Personal Address".
My first question is, are the Work address and Personal address fields overlapping each other?
Second question is...what about the command Go To Object and "personal address" fills in the rest of the address fields such as address 2, city, state etc.