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.

Field Population Table??

Featured Replies

I'm trying to come up with a way to create a generic field that isn't necessarily tied to any of my other table's records. The purpose is so that a user could enter text into that field and the text would then be inserted (via script) globally for all the records in the found set.

For example: I've got 20 different records, each need one specific date. Rather than going to each record and adding the date, I'd like to be able to enter the date into this "Global" field and when I hit a button, a script would run that would insert that "Global" field's text into the 20 records.

Writing the script isn't the problem. I can't seem to come up with a way to display this "Global" field in my related tables. I don't want to add it to my related tables because they all have many records in them. The way I imagine it to work is that there would be a table with only one, empty record in it. I would be able to populate that record from one of my related tables and then clear it after I've run my script.

I hope this makes sense, I've now exhausted my humble bag of tricks. Got any ideas???

...What?

I came onto the forums to ask a question, but i forgot what it was, so instead i'll TRY and help you.

Ok, firstly, it doesnt matter where you put your field or what it is as long as it is defined as global. I.e. you could make a seperate table for your globals and not have it related to anything, and because your field is defined to store its data globally, you could place it in any layout you would like, and manipulate its value through script or manually from any point of the database, once again regardless of relationships.

So, now that we've worked that out, ill just show you a quick script you could use.

Allow User Abort [Off]

Freeze Window

SetVar[$CurrentRecord ; Get(RecordNumber)]

Go to Record [First]

Loop

SetField[TableContainingField::FieldToBeSet ; GlobalTable::GlobalField]

Go to Record [Next;Exit After Last]

End Loop

SetField[GlobalTable::GlobalField; "" ]

Go to Record [by Calculation ; $CurrentRecord]

Any trouble, or if this wasn't what you wanted, post again

~Genx

Add an error checking routine in that loop to check for locked records. Then add a routine to revisit or report the records that were locked.

  • Author

Thanks, I think with a little tweaking, that should be what I need. In my description of my problem, I referred to this imaginary field as "global", when in fact, it hadn't occurred to me to actually set up the field that way. Sometimes the easiest answers are right in front of you, eh?

Thanks for the tip,

Cheers!

Create an account or sign in to comment

Important Information

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

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.