Jump to content
Server Maintenance This Week. ×

script problem - creating related records


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

Recommended Posts

Hello everybody,

I'm trying, for a set of records to create, NEW, related ones.

Briefly, I have a SHOPS file (containing 2 fields: shopID and shop name) and a second one MISSION with tasks related with those shops (having as fields missionID, shopID, product, client, aso.)

My objective is to be able to create a new mission for each shop in the current found set. I activate the "make new missions" script from a layout in the Shops file which includes a portal with related fields from the mission table.

My script looks like this:

go to record/request/page [first]

loop

go to portal row [select;last]

set field [mission::product; a value]

set field

set field....

go to record/request/page [next; exit after last]

End loop

So far, so good, even in the example file that I'll attach to the post everything works fine...

But not in the main database, where I want to introduce this feature, the only difference is that on the same layout (where I launch the script) I have one more portal. Anyway, over there, this script is mainly changing existent missions, not adding new ones.

Any idea would be very much appreciated.

Thank you in advance!

Alin

example.zip

Link to comment
Share on other sites

This topic is 7033 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.