Import from XLS into a Portal
Is the any way to import from a Excel Spreed Sheet into the Portal Record. One Excel Record (line) per Portal Record...?
The second script is what I had in mind (But you need to assign the ID's to the newly imported records before changinb back to the original layout), but can be made a touch simpler:
Set Variable [$ID; Value: Main Layout::Main Layout ID]
Go to Layout ["Portal"(Portal)]
Replace Filed Contents [no dialog ; Portal::PortalID ; $ID]
Go to Layout ["Main Layout"(Main Layout)]
Import Records produces a new found set of just the imported records. Replace Field Contents modifies every record in the current found set, so using these two steps together like this eliminates the need for a loop here.
Yes, but you need to import from a layout based on the portal's table rather than the field where you have the portal. This can be scripted so that it appears to the user that your imported records were imported directly into the portal.
Ok, the script from the Main Layout which has the Portal embedded:
- Freeze Screen
- Go to Layout ["Portal"(Portal)]
- Import Records
- Go to Layout ["Main Layout"(Main Layout)]
Could it be this simple? Would you have to set a variable for the Main Layout ID and then a Loop after the Import to set the Portal ID the same...?
- Set Variable [$ID; Value: Main Layout::Main Layout ID]
- Set Field [Portal::Portal ID; $ID]
- Go to Record [Next; Exit after Last]
- End Loop
Retrieving data ...