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.

Setting multiple fields sequentially

Featured Replies

Hello FM Mavens,

I need to accomplish the following task.

I have several fields, sequentially tabbed, named A, B, C, D etc. Each of them can be set to 0, 1, 2, 3 or 4.

User sets some of the fields to a number other than 0

THEN: I need a script that sets the fields that were left empty to zero.

Obviously it could be done by explicitly defining the fields but there are dozens. 

I thought of something like Go to next field, if (isempty "next field") set "next field" to 0. The problem is that the (isempty <field>) function requires an explicit field definition so how do I accomplish that? Or there may be a better solution?

Thanks

Asu

I strongly suspect that instead of "dozens" of similar fields, you should have records in a related table instead. I bet that would make a lot of things much easier, not just the current task.

Anyway, if you are able to loop through the fields using Go to Field [Next], you can test if the current field is empty by =

IsEmpty ( Get (ActiveFieldContents ) )

 

  • Author

Sure but this is a concept question. 

Thank you for your answer. Sorry, I forgot to ask the other half. Now I need to set the "active field" to a value. 

 

 

7 minutes ago, Asu said:

Now I need to set the "active field" to a value. 

Use the Set Field[] script step, with no field specified. From help

If no field is specified and a field is selected in Browse mode or Find mode, that field is used.

 

9 minutes ago, Asu said:

this is a concept question

OK, but I still think the concept is flawed.

 

  • Author

thank you

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.