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

: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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    dataclip 
×
×
  • Create New...

Important Information

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