Jump to content

This topic is 4697 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

Posted

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?

Posted

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.

Posted

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

This topic is 4697 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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