Skip 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.

Set field script step

Featured Replies

I'm having trouble getting the Set Field script step to work for me.

I'm going to another table in the database, creating a new record which has a couple of auto enter fields, then using three set field steps;

One sets the field content by a calculation - that works,

Another sets the target field to = a source field from the active record in the table I came from and that works too,

another sets a field to = a field (global) from the table I came from, but it just keeps leaving the target feild blank.

Source and target fields are number fields.

I've tried stepping through the script with debugger, that just shows that all other steps are working except this one.

Any ideas? I'm obviously missing something.

Hi

store the value of the global field into an $variable before going to the other table.

Daniele's suggestion is good, but... global fields are accessible from anywhere, even non-related tables. Are you sure the global actually has a value? I'd suggest you watch the global from the Data Viewer while stepping through the debugger.

  • Author

Thanks for the tip. I watched the data viewer as I stepped through the script steps. Here's what happened;

The source field's value appeared in the data viewer while I was on the layout (and in the table) where the source field is. As soon as the script goes to the layout where the target fields are, the data viewer shows the offending source field as blank. (refreshing has no effect). The other source field from the same table and layout continues to show it's value in the data viewer.

I even tried using Insert calculated result instead but to no avail.

Phil

Correction: Actually the global source field held it's value. It was the regular source field that wasn't going into it's target field.

Edited by Guest
Correct my info

Correction:

store the value of the [color:red]regular field into an $variable before going to the other table.

  • Author

OK, how do I do that?

It's ok I worked it out using FMHelp. Problem solved thank you.

Any reason why? Is this normal or is my DB damaged?

Thanks anyway people.

Edited by Guest
Worked it out

This is normal. When two tables are not related, one table cannot "see" any data in the other except for global fields.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.