Tom Kennedy Posted May 6, 2009 Share Posted May 6, 2009 I have a text box that I want to go to and set a variable's value to the value of the text in an edit box. When I step through the code the variable does not retrieve the value and has a '?' when viewed with the data viewer. Also when the goto object code is executed, the value of the text is framed with a dark rectangular box. I created a new text box with all the characteristic of the first text box (that I could think of) and this text box will let me set the variable value to the value of the text box. Also when the goto object code is executed, the text box acts like it will let you change the value (no dark rectangular box. I have searched high and low to see what difference there is between the two text boxes. Any ideas? Link to comment Share on other sites More sharing options...
comment Posted May 6, 2009 Share Posted May 6, 2009 A file showing this would be helpful. Link to comment Share on other sites More sharing options...
Vaughan Posted May 7, 2009 Share Posted May 7, 2009 By text box you mean a field? If you mean a text box as in a text object on a layout, I doubt you can be it's text content into a variable. Link to comment Share on other sites More sharing options...
Tim Anderson Posted May 7, 2009 Share Posted May 7, 2009 You can get the text from a text object on the layout using: GetLayoutObjectAttribute ( "textObjectName" ; "content" ). If this object is something like let( $wTitle="TheTitle";1) and you evaluate (GetLayoutObjectAttribute ( "textObjectName" ; "content" )) then you will create a variable $wTitle with a value of 'theTitle'. Hope this helps Link to comment Share on other sites More sharing options...
Vaughan Posted May 8, 2009 Share Posted May 8, 2009 Tim, that's excellent! Link to comment Share on other sites More sharing options...
Tim Anderson Posted May 9, 2009 Share Posted May 9, 2009 Glad it helped Link to comment Share on other sites More sharing options...
Kiele Posted May 10, 2009 Share Posted May 10, 2009 Hi All, Could someone please point to a demo of this procedure, or post a sample file of this. Thank you for your assistance in advance, Kiele Link to comment Share on other sites More sharing options...
Vaughan Posted May 10, 2009 Share Posted May 10, 2009 Here's all I did: go into layout mode, put text object on layout, give object a name; go into browse mode, call function in data viewer. If you don't have FMP Advanced, make a script with a custom dialog that displays the function. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5465 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