To be more specific... as in automate the listing presets every time a new record is created.
The way is to create 4 child records when a new record is created using a scripted process. But one may ask why...
Set Variable [ $parentID; pkParentID ]
Go to Layout [ Child ]
Set Field [ Child::fkParentID; $parentID ]
Set Field [ Child::Category; "Tools" ]
Set Field [ Child::Category; "Liquids" ]
Set Field [ Child::Category; "Disposables" ]
Set Field [ Child::Category; "Misc." ]
Go to Layout [ Original ]
Many thanks, mr_vodka for such a prompt reply... Am not really a programmer hence it takes me a while to figure out what you 've written. Is setting field after duplicating the same as Go to Portal Row [Next] and then Insert Text using a scripted process?
I tried the Go to Portal Row and inserting Text method,.. and i ended up having to click the button to activate the script 4 times before all 4 portal rows are filled accordingly... i wonder why and how can i work round this?
This sounds like something I do with an invoicing database I maintain. We "pre load" the invoice with 4 specific items as those 4 items cover 90% of the business transactions and it enables our people to more quickly serve customers.
I use the following script outline:
Set Field[gItemKey; 1]
Go to Portal Row [Last]
Set Field [PortalField; ItembyKey::ItemName]
Set Field [gItemKey; gItemKey + 1]
Exit Loop If [IsEmpty(ItembyKey::ItemName)]
The items to be loaded in the tag are recorded in a table referred to by the ItembyKey table occurrence which is defined as:
gItemKey is a global number field and ItemNumber is a number field in the table that incidentally specifies the order of that the items will appear in on the invoice.
The portal relationship has to be defined to allow creation of related records.
This approach works well as users can change the items to be pre-listed on the invoice simply by editing a table instead of having to modify the script each time.
Thanks PhilModJunk... sounds like a solution of a case close to mine... will give it a try in the morning and hope it works! *fingers crossed* thanks once again and will post again on the result :)
Thanks PhilModJunk... It finally works! And thanks mrvodka for your help too... :)