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

Getting number of selected record w/o script!?


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

Recommended Posts

I know how to get the number of the currently selected record using a script. The question is, if there's also a way to figure out the number of the SELECTED record with just a calculation and NO script.

None of the Status(CurrentRecord...) functions provides this info as it seems. However if you take a look at the image below, you might understand why I'm asking.

62918-listproblem.gif

Or does anybody know either how to prevent the empty space below the list from being clicked or how to make the empty space act like a button, so that it stills can trigger a script?

listproblem.gif

Link to comment
Share on other sites

I really have to think hard... I can exactly recall why I've chosen list view over selfjoin portal and Browse Mode, but I'm pretty sure there was a reason. I'll give it a try, although this will probabely mean changes to most of the related scripts...

Link to comment
Share on other sites

Ref...

"if there's also a way to figure out the number of the SELECTED record with just a calculation and NO script."

You could use an unstored calculation which = Status(CurrentRecordNumber) - if you're going to do anything with the result.

But, if you just want to display it, just type @@ on the layout and this will display the current record number when in Browse Mode.

Link to comment
Share on other sites

Dilucaugo68,

it seems my brain is stuck. I can't figure out how to show all records as item of the self-join portal in each record. I need all to all, not all to one or some to one and others to another. Can you give me a hint?

Link to comment
Share on other sites

Hi,

Well, you'll need a constant relationship using both a global field (numbr =1) for left side and an indexed calc (=1) for the right side.

Reading at Russ's answer, there might be a solution for the Status(CurrentRecordNumber). As a firts reading, I thought you were trying to show the current Id (you Id, Inv025,...).

But I generally really like selfjoin portals (even those fixed ones) and almost try to get rid of list mode views.

Link to comment
Share on other sites

The solution with the self-join has the advantange that's its impossible to click anything else than a record in one of the portal rows. So this would solve my "empty space below the list" problem, which is why the use of a script would be OK again.

However, the two big disadvantages as I have figured out are that,

a) no matter how many "Freeze Windows" script steps I use the Window flashes/visible redraws and

: I can goto to a specfic portal row, but the focus gets lost as soon as I click outside the portal (in case the number of records is higher than the number of visible portal rows).

Link to comment
Share on other sites

"... how to make the empty space act like a button, so that it stills can trigger a script..."

Easier than you think... assuming that the blank row at the bottom allows the creation of new records and isn't just a blank related record.

For the blank row at the bottom, the related remote key is empty. Always. All you need to do is make a script that checks for this...

If [isEmpty(relationship::remotekey)]

   <stuff for the blank row>

Else

   <stuff for a related record>

End If

Link to comment
Share on other sites

"Easier than you think... assuming that the blank row at the bottom allows the creation of new records and isn't just a blank related record."

Vaughan,

could it be that you are talking about a portal while I'm talking about list view?

Link to comment
Share on other sites

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