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

Help: Create Records from values in Portal.


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

Recommended Posts

Posted

Hello to all portal masters!

I have a portal in FILE-A that displays the related records from FILE-B. The portal shows the field "Tenant_Name". I also have a "Receipt_Num" field in FILE-A. "What I can't figure out is how to make a script that auto-creates New Records in FILE-C depending on the number of Customer Names shown in the portal, and with the same "Receipt_Num". For example, The current value of "Receipt_Num" is 0808 and the portal shows the following names:

Mark Jackson

Joe Smith

Henry Thomas

The script should make 3 new records in FILE C, one for Mark Jackson, one for Joe Smith and one for Henry Thomas with all having the same Receipt Num 0808. All I know for now is that it requires a script in FILE A and a subscipt to perform in FILE C to have an auto create record result. I just can't figure out how to extract the values from the portal automatically. What is the correct function to use? I hope somebody can enlighten me on this problem of mine.

Thanx,

Chard =)

Posted

It took me a while but I finally found a way to copy data from portals row by row by using a count and loop function. First I counted the number of rows present in the portal by having a calculation field "PORTAL COUNT" = Count(RelationshipName::FieldName) Then I made the following in the script. Note: "gXXXX" are global fields.

Set Field ["gPORTAL COUNT", "PORTAL COUNT"]

Set Field ["gCOUNT", "1"]

If ("gPORTAL COUNT < 1")

Exit Script

End If

Loop

Exit Loop If ["gCOUNT > gPORTAL COUNT"]

Go To Portal Row [select, "gCount"]

Go To Field [select/perform, "RelationshipName::FieldName"]

Copy [select]

Paste [select, "gFIELD"]

Set Field ["gCOUNT", "gCOUNT + 1"]

Perform Script [subscripts, External: "Whatever"]

End Loop

The "Whatever" subscipt can be your new create record in the related file. The above works for me but it kinda looks ugly with the copy and paste steps. I was wondering if somebody has an alternative to the copy and paste function to use in copying data from portals.

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