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.

Simple problem but can't figure it out. Duh!

Featured Replies

New to scripting and I'm just trying to write a new record with some fields changed. I can write the new record based on a related tables key field but none of the fields I set to new values change in the new record.

here's the script

post-106272-0-91311800-1332485035_thumb.

For some reason I can't copy and paste it so this is an image file. (Explanation anyone?)

Anyway the new records are written to Pay Records as expected using the key field from Form View but none of the fields I am setting are being written with the set value. I know this is caused by my own stupidity but a few days of research and I can't figure it out.

Any help gratefully appreciated.

You have a comment that says Loop, but you aren't looping. Read up on how to loop.

  • Author

I commented the loop out for testing. Will put it back when I get it to work.

To be clear, you do not have the Loop or End Loop script steps and they are not disabled. Placing a comment does not "comment" out script steps. You have two sets of the same fields. You will not need more than one set of fields:

go to layout 1

Go to First Rec

Loop

Set $var

Set $var2

go to layout other

new record

set field, $var

go to layout1

got to next, exit after last

End Loop

That is the basic structure.

When you get to the Set Field PayRecords::Pay Salary, you are in the PayRecords context. You are trying to set the field to the Personnel Records Salary field. Without seeing your relationship graph, I can't tell if you can actually "see" this field from the context of PayRecords? What is the relationship btw the two tables?

  • Author

Thanks for the answers. To be clear I have put the loop back in although that is not the problem.

The script is not writing the variables to the new record in Pay Records apart from the Employee ID field (from $Emp). I am sure I am doing something basic wrong but can't for the life of me figure it out. I have attached the script (with loop reinstated) and the relationship graph.

Thanks for any help.

post-106272-0-53267500-1332561614_thumb.

post-106272-0-57528700-1332561616_thumb.

If $fullmonth ≠ N, the personneorecords::Sallary field is entered into the field repetition, not the field value.

  • Author

Thanks - that was it!

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.