Newbies wildbill Posted June 13, 2010 Newbies Posted June 13, 2010 Hi All, I am new to filemaker and Scripting. Could someone possibly tell me the script i need to combine the text from three separate text fields and insert it into a fourth text field with each result on a new line. Many Thanks Giles
efen Posted June 13, 2010 Posted June 13, 2010 Set variable [$one;firstfield] Set variable [$two;secondfield] Set variable [$three;thirdfield] Set field [fourthfield; $one & ¶ & $two & ¶ & $three]
Raybaudi Posted June 13, 2010 Posted June 13, 2010 Are yoy sure that you need a script ? Because you could obtain the same result with a calculation field ( or an auto-enter calculation on a normal text field ) using simple the List ( ) function, something like: List ( Field1 ; Field2 ; Field3 )
bruceR Posted June 13, 2010 Posted June 13, 2010 I prefer the list function: Set variable [$one;firstfield] Set variable [$two;secondfield] Set variable [$three;thirdfield] Set field [fourthfield; List( $one ; $two ; $three) ]
comment Posted June 13, 2010 Posted June 13, 2010 Why not simply: Set field [ Field4 ; List ( Field1 ; Field2 ; Field3 ) ] That's assuming a script is required at all.
Newbies wildbill Posted June 13, 2010 Author Newbies Posted June 13, 2010 Hey Danielle, You were right I wanted a calculation not a script. Thanks very much for your help Giles
Newbies wildbill Posted June 13, 2010 Author Newbies Posted June 13, 2010 Hi all, Thanks for your help. One other query I had would be: Say I have a 5 fields I want a seperate field to tell me how many of the 5 have been filled in with text, is there a calculation i could do for that?? Thanks Again Giles
comment Posted June 13, 2010 Posted June 13, 2010 Try = Count ( Field1 ; Field2 ; Field3 ; Field4 ; Field5 )
Newbies wildbill Posted June 13, 2010 Author Newbies Posted June 13, 2010 (edited) You've all been a great help, I'm all sorted. Thanks very much for your time Giles Edited June 13, 2010 by Guest
bruceR Posted June 13, 2010 Posted June 13, 2010 Why not simply: Set field [ Field4 ; List ( Field1 ; Field2 ; Field3 ) ] That's assuming a script is required at all. I was just going along with the original format; and sometimes using variables in a script allows for easier debugging. But of course your suggestion works fine and I agree completely that it's a valid and simpler solution.
Recommended Posts
This topic is 5335 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