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

Can the value in a global field update automatically when the active record changes?


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

Recommended Posts

Posted

HI all,

I have a global field that mirrors the Key field's value of the active record on a layout. I need it to update with the current record's Key field value as I flip through the records. I was hoping there would be a function such as "Get(ActiveRecord)" that could be used for this, but perhaps there's something with a different name. Anyone know?

Posted

If you need the key field to change whenever you load a new record... why not just use the key field? IT changes every time you flip through records...

David

Posted

It actually has to be a global field that changes to corrospond to the active record's key field value. The field needs to change to mirror the active record's key in order to establish a dynamic relationship that highlights a portal row specific to active record. I need for the highlight to change portal rows as you flip through records WITHOUT having to click a button or run a script.

I hope this makes sense. Anyone have any ideas?

Posted

Myron,

I've tried to use global fields in a similar way. I was able to update the global field using a simple script. A script was required. However, the change in the global is not saved to the database even if you commit the record.

If you have only one portal row related to the key field from another table, why are you using 2 separate tables? If there is more than one portal row related to the key field from another table, using the key field will not specify which portal row you want highlighted. Only the key field from the table containing the fields you display in the portal will specify a particular portal record. In the later case you would not need to set a global field.

Sailor1

Posted

It's kind of hard to explain without going into details of the entire solution, so some might wonder why I'm doing this. But the portal on my layout lists all the records in the current found set, usually only about 10 records. It's intended to give the user a "big picture" snapshot of where he's at among the records in the found set.

The portal is made possible through a self-join, and my need for a global field containing the currently active record's key is so that the active record in the portal is highlighted as you flip through the records. I would like the highlight to move around the portal rows according to which record you're on without having to run scripts.

So, this is where I was hoping for a simple funtion such as Get(ActiveRecord)to solve the problem.

Posted

This can be done, using an unstored calculation field =

Let ( $activeID = SerialID ; "" )

This field MUST be present on the layout. To highlight the corresponding portal record, define another unstored calculation field along the lines of:

Case ( SerialID = $activeID ; <> ; <> )

Note that when you enter the layout, the highlight may not evaluate properly (or not at all), so you might want to script that.

  • 1 month later...
Posted

Ok, I've figured out a different similar way of doing this, and it's working for the most part except for the first portal row on my layout. Any reason why that would be?

jon

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