Jump to content
Sign in to follow this  
Baylah

Create New Record in Related Table From Current Portal Row.

Recommended Posts

This has probably been asked and answered so I apologizze if this is redundant.

How can I script to copy the information from a current portal row in to a related database? Essentially I want to crate a new recoird in the related database from the information in the current portal row I am working on.

It's the portal that is throwing me off...I can do this easily when the portal equation is not in the mix.

Thank you,

Steve

Share this post


Link to post
Share on other sites

If you click a button in a portal row, the script will act on information from that row, unless you have a script step that takes you out of the portal. Set the related field values into variables before you leave the portal row (by e.g. committing the record or changing layouts).

Share this post


Link to post
Share on other sites

Are you saying to use the "Set Variable" scipt step insted of "Set field" ? If so I have never used that script step to move information between two locations. How do you specify the target and calculated result for the target? Or am I just misunderstanding you altogether?

My Button is inside the portal row. I have tried several different things to makes it work using Set Field and commit record. I'm striking out.

thanks,m

Steve

Share this post


Link to post
Share on other sites

Does anyone else have any suggestions?

I'm Stumped.

Sorry,

Steve

Share this post


Link to post
Share on other sites

:blush2:

I figured it out using set variable.

It looks like this:

Set Variable [$$movepfk; value:GetAsText(ProductPortal::pfk)]

Go to Layout ["products" (ProductPortal)]

New Record Request

Insert Calculated result [select;PRD Product Portal::Style:$$movepfk]

Steve :blush2:

Share this post


Link to post
Share on other sites

The variable does not have to be a global variable. You cant just use a local variable since it is being used in the same script.

Set Variable [$movepfk; value:ProductPortal::pfk]

Go to Layout ["products" (ProductPortal)]

New Record Request []

Set Field [PRD Product Portal::Style; $movepfk]

Share this post


Link to post
Share on other sites

Hi John,

Thanks for the tip...I had tried it with just one "$" but it did not work. I must have entered something else incorrectly and then just gone for the global.

I will double check my work and try it your way.

Steve

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.