Then you have to go to your Related record first and do the change and then change your parent record
You mean I have to go go child layer, then use PERFORM FIND command to find these records, then do loop to replace all related fields contents, then go to parent layer?
Is there any simple way?
Set Variable NewID
Go to related record
Loop Child Records
set field ID Variable NewId
Go to record NexT Exit last
go to layout original
Why would you want to do any of this?
Why would you CHANGE the primary key of a record?
I am not sure if my action is correct or not?
I have an Order table, using Pending order number as temporary order number at the beginning, e.g. Pending0001, for the child related table, connect with parent table by using this order number as key field.
When I need to change Pending to Official order number, so I change the parent order number, let's say, TB0001. After change, the portal lose relationship with parent, because it is still "Pending0001" in it. So I need to replace it with "TB001" so that I can see the results in portal.
I don't know if you can understand my poor English, haha...
I bet it's not a smart way to achieve my objective, is it?
One should never, ever modify the value of a primary key. A change in order status should not require such a change.
How can I do that?
Use a separate field for the status, don't make status part of the primary key field's value.
The ideal primary key is:
1) Never, ever changed once assigned to the newly created record
2) Always unique
3) Does not have "encoded meaning" (such as your order status)
4) Is implemented in as simple and as fool proof a manner as possible
Some times you need a "label" value that is also unique but which has encoded value, special formatting etc. Such field should not be used as the primary key used to link records in relationships. Just define it in the parent record as another field so that it can printed, used in searches, sorts etc, but when the need arises to change that field's value or format, you can do so without disconnecting related records.