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.

Targeting a field by calculation

Featured Replies

I'm looking for some way to change the contents of a field similar to the Set Field script step, except I want to use a calculation to determine the target field instead of choosing from a list.

Is there a way to do this in FM7?

Thanks for your help,

Michael

The only way to do this easily AFAIK is loop through the fields on the current layout and exit when the current field name equals the calculation.

If [Position(

Another way might be to use a global repeating field calculation to hold ALL the field values to POSSIBLY be replaced and then skip (**with calculated value**) to the repetition holding the info, change it, then re-write all reps BACK to each field.

You know which field each line goes to, wink.gif The same script writes them.

Depends on the performance hit based on searching the number of fields in the layout versus how many will / could change.

What do you think?

What do you think?

I think I would like to see a template...Please?:)

--sd

Since you have Developer 7, you could use the custom matrix functions. If you set the elements of a matrix to contain the various fields involved, you could use SetCell(matrix;row;column;value) to set the cell of the matrix you wish to change. The row and column could be determined by calculation.

  • Author

Thanks, I'll try out all your suggestions. Too bad FM7 doesn't just us do it in a more straightforward way!

---

Michael

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.