Jump to content

Working with specific portal rows


webber
 Share

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

Recommended Posts

  • Newbies

I have searched and tried all the things that make sense and know the solution will be easy ... but alas it eludes this beginner.

In a portal I want a button that takes record data from the parent and inserts into that portal row. Kind of a 'same as' option when user is entering data. I have the button working but only on the first portal line, regardless which row the button is. I know I need to somehow check which portal line (get portal row) I am on, then do the work on that line but I don't know how to get that data into my script ... how do I do this?

Thank you in advance for your patience.

Link to comment
Share on other sites

In a portal I want a button that takes record data from the parent and inserts into that portal row.

This is kind of disputing the idea of relational design in the first place ...but I'm making a strawmans fallacy here, you probably just should ignore.

Instead should we focus on the issues involved - namely commiting of the record. The safest approach is never to leave the portalrow and exploit Set Field[ to get the value from the parentrecord:

LeftWords(MiddleValues ( test::gAfield ; Get ( PortalRowNumber ) ; 1 );99999)

What this does, is that it plucks in a global field in the parent records with pilcrow delimited values. Where copy and paste changes the focus, as soon as the cursor leaves the portalrow is the focus in the portal lost. The cursor can't be in two locations.

If you can't (...you should be abel though) must the portal row be stored in the scriptparameter put on the button def, so you can get back and stuff in the correct destination.

Copy [ main::gAfield ] [ Select ]

Go to Portal Row [ Get ( ScriptParameter ) ] [ Select; No dialog ]

Paste [ portalStuff::OtherData ] [ Select ]

Commit Records/Requests [ Skip data entry validation; No dialog ]

I would guess that it's the answer you think you need, but it isn't since tampering with the users clipboard is considered a developers sin ...thou must not expoit copy/paste in an applications inner mechanics, it's ment for interfacing other entirely different applications dealings.

You should in 99% of all cases be abel to use the Set Field!!!!

--sd

Link to comment
Share on other sites

This topic is 5646 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
 Share

×
×
  • Create New...

Important Information

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