RogerJ Posted September 25, 2004 Posted September 25, 2004 I have a field (label_heading) that I would like to fill with 3 other fields - first_name, middle and surname. I can copy and paste with a script, but it only shows the last copy and paste - the surname. I have also tried to make it (the label_heading field) a calculation, but it shows nothing. As in first_name& " "&middle&" "&surname. What am I doing wrong? Thanks in advance for your assistance, Roger
LaRetta Posted September 25, 2004 Posted September 25, 2004 Hi Roger, If you wish to set a Standard text field (named label_heading) with this concatenation (via script), it would be something like: Set Field [label_heading, first_name & " " & middle & " " & surname ] If you wish to use a text calculation, it would be: first_name & " " & middle & " " & surname I suspect your script wasn't working because, for copy/paste, the resultant field must be on the current layout ... or ... you weren't concatenating them within the script itself (as above) by attempting to copy each one individually(?). I would also verify that all fields involved are text data types. Otherwise, unless there is something else, this should work fine for you. LaRetta
RalphL Posted September 25, 2004 Posted September 25, 2004 The calculation should work as you have stated it. Is it set to be text? It could be improved to skip missing parts with IF statements. If( not IsEmpty(First_Name), First_Name, "") & If( not IsEmpty(Middle), " " & Middle, "") & If( not IsEmpty(Surname), " " & Surname, "")
-Queue- Posted September 25, 2004 Posted September 25, 2004 You can use Case instead of If and remove the null false results. Or you can get tricky, First_Name & Case( not (IsEmpty(First_Name) or IsEmpty(Middle)), " " ) & Middle & Case( not (IsEmpty(First_Name & Middle) or IsEmpty(Surname)), " " ) & Surname
Recommended Posts
This topic is 7433 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 accountSign in
Already have an account? Sign in here.
Sign In Now