Jump to content
Sign in to follow this  
Tamlin

Moving data between portals?

Recommended Posts

I have two DBs simple single column list portals on a layout. I need to provide a move right >>>> button and a move left <<<< button between the portals. The object is to select an item in a portal and click the button to move the item to the other portal.

Any ideas on how to do this would be greatly appreciated.

Thanks

Share this post


Link to post
Share on other sites

I'm assuming the two portals are looking at records in the same (child) file -- for example, in portal A - New Messages, and in portal B - Read Messages.

To move records from portal A to B, or vice versa, you will need to make two scripts in the parent file, one for each portal.

The script in portal A will change the field in the related child record from the value that makes it show up in A, into the value that makes it show up in B (for example, from UNREAD to READ). Finish the script with Go To Layout (original) so that it resets the portals in the layout to your new settings. The second script does the opposite, editing the value of a child record in Portal B into a value that will make that child record show up in portal A (for example, from READ to UNREAD).

I would recommend using the Set(field) script step for altering the child record's key field. Don't forget to place the button in the portal rows themselves, as the script should refer to the record row it's in.

Share this post


Link to post
Share on other sites

What if they were two seperate files?

I am assuming you're talking about the files that the portals are relating to.

This can be done too, but the script involved in 'moving' the file from Portal A to B, or vice versa, would then need to do two things:

a) break the relationship from the portal it started out in, either by editing the related key in the child record, or deleting the child record.

and

??? creating a new child record, with a correct related key, in second portal.

This can be done through scripting. I don't recall ever having built such a solution, but it could be done.

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:
    Lee Smith 
×
×
  • Create New...

Important Information

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