Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Insterting data into multiple fields in one portal row


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

Recommended Posts

Posted

I want to create a new record in a database, using a portal, then add to that record using the related data. I was just doing GOTO last portal row, then GOTO specific field, then instert field x into field1, and then insert field w into field2, etc. But every time I do this it either updates the very first record in the portal list, or, if I play around with a goto portal row command, starts creating new records for each value. I'm sure I'm missing some basic element here.

Posted

I guess I need to say that this is a looping script and the first one works fine, but the next loop and there after will insert into the first records fields only.

Posted

A lot of the developers I know of turns the "allow creatio..." of in their relations def. and creates new records in the related file instead, because the modality of the dangling new record violates some interface rules. This have become much more supported under fm7 and upward ...but since you're on fm6 still, should you consider setting global fields in the related file via another relation and use these as source for the autoenters that happen when a new record is created beyond the recordID ...what I'm saying is that every field could be an autoenter.

We have taken it for granted that data stored in the portal is of historic nature such as lines in an invoice. Often do we need sets of items to be entered with prices etc. which only requires minor adjustments to itemcounts in a few lines perhaps. Ideally should this be solved via a recursive relation, but we can cheat an use the idea behind this template:

http://www.dwdataconcepts.com/dl/tw/compinv2.ZIP

...that although it's for an earlier version, still shines in it's simplicity to implement.

--sd

Posted

chevell,

Your loop can still work if you first go to the last portal row, then add your data. If you must leave the portal in the middle of setting fields, use a global to hold the current portal row number, then use Go to Portal Row [ by calc ] with your global, to return to the correct row.

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