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

Referencing a related field via a calculation


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

Recommended Posts

Posted

I'm working on a day view schedule. I have a Schedule table with the schedule view. This table contains one record and is used merely for the interface. Globals fields are populated at login with date and time variables. When a user logs in, a set of time blocks is created for him or her. These act as a join between the schedule view and the Appointments table. One thing to note, the schedule shows each user's appointments for the day with user names down the right side and appointment time across the top (ie: time-line view). There are 20 portals on the view (from 10am - 7:30pm in 1/2 hour increments).

Here's my question. Is it possible to construct the name of a related field via a calculation? In other words, an invisible button sits on top of each schedule block in the Schedule view. When clicked, a script is triggered that either creates a new record or asks the user if he/she wants to modify and existing appointment. What I'd like to be able to do is have the user click on the portal (invisible button) and pass the relationship name to my create/modify script.

Right now I essentially have a duplicate script for each time portal. For example,

AM10::FieldName

AM1030::FieldName

AM11::FieldName

...etc...

I use an If() statement in my script to check whether the portal is empty or contains an appointment:

If ( AM10::FieldName = 1; "Appointment"; "Empty")

Rather than have a unique script for each time portal, can I pass the "AM10" portion of the field reference via a script parameter? The referenced field name is always the same. It is only the relationship that changes.

I hope that I've explained this well enough. :-) Any help would be much appreciated!

-Rob

Posted

I assume the times are fixed in arrangement (and are all displayed without scrolling). If so, then you can simply set the parameter for the script of each button to the corresponding time (i.e., table).

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