searson1 Posted September 28, 2006 Posted September 28, 2006 Hi everyone. How can I get two fields contents to appear in just one field as well. By that I mean I have two fields Surname & 1st Name in that order. I would like the contecnts of those fields to appear in another Layout in just one Field called Full Name. How would I go about doing this please. Do hope you great guys will help me again here. Mark
agtjazz Posted September 28, 2006 Posted September 28, 2006 You could make a calc field (that is not stored) and the calc would be emp_name_last & "," & emp_name_first Or look into Merge fields....<??> Hope that helps
searson1 Posted September 28, 2006 Author Posted September 28, 2006 I will try both, thanks for that. Mark
ThatOneGuy Posted September 28, 2006 Posted September 28, 2006 Hi Mark: If you'll never need to perform a Find on the Full Name, the Merge Field suggested by agtjazz would work pretty well. In a text object on your layout, use the Merge Field command under the Insert menu to build an expression similar to ... <>, <> ... and that should just about do it. There are some considerations to this approach, though. For one, it is not searchable. If you define a field as a stored calculation, you can perform a Find on the FullName field where it appears on any layout. Another problem revolves around the leading or trailing "comma-space" characters when both fields are not populated. Under the Merge Fields technique, there's no way to address this problem ... short of creating a calculation field, which would be kinda circular, wouldn't it? Under a text calculation field, you can avoid the same "comma-space" problem if the argument provides for all possible permutations. There are a number of techniques to achieve this, but the one below may help you gain a foothold as you go further with FileMaker: Case ( ( not IsEmpty ( Surname ) ) and ( not IsEmpty ( FirstName ) ) ; Surname & ", " & FirstName ; ( not IsEmpty ( Surname ) ) and ( IsEmpty ( FirstName ) ) ; Surname ; ( IsEmpty ( Surname ) ) and ( not IsEmpty ( FirstName ) ) ; FirstName ; ( IsEmpty ( Surname ) ) and ( IsEmpty ( FirstName ) ) ; "" ) Make sure the calculation results in Text. Activating the "Do not evaluate if all referenced fields are empty" option obviates the need for the last Case permuation, but it won't hurt anything. Finally, set the calculation to "stored" if you'll ever want to search on its contents. I hope you find this useful. Some folks don't mind trailing commas; others want their work to appear more thoughtful. I've occassionally walked out of the house with my fly inadvertently open, but I still try to avoid it.
searson1 Posted September 28, 2006 Author Posted September 28, 2006 You guys are great. I have played with the several suggestions above, but have come back to the commnad. I have decided that the Full Name will not be an option for the search, which is no biggy. However, I am sure that as I progress and my Database becomes more sophisticated (and it will - it is 10 times more sophisticated than it was 3 weeks ago), I will look at the other possible implementations mentioned here. So thanks again for the help! You guys are not only making it easier for me to build this database, but because of you I am learning! A Silver Surfer Learner!!!!
Recommended Posts
This topic is 6633 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