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

Working with specific portal rows


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

Recommended Posts

  • Newbies
Posted

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.

Posted

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

  • Newbies
Posted

Ahh , beautiful and so simple. Now I understand completely SetField and importance of focus in the portal line. Another issue is also solved by your answer.

Thank you so much sir.

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