Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't set variable on an object

Featured Replies

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?

A file showing this would be helpful.

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.

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

Glad it helped

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

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.