Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

go to specific record by calculation via script

Featured Replies

  • Newbies

this is a newbie question and may have been answered b 4.. i did a search but didn't find an answer.. maybe i missed it, so feel free to point me to that thread....

Thanks for your help.

------

Problem:

unable to view a specific record in a new window (created via script) using the Go To Record/Request/Page command using the By Calculation option.

What I'm Doing:

each record has a CONTACTID (auto generated serial #) or RECORDID (assigned by FM) which i've passed to the script via the scriptparameter.

in my mind the calculation should be

Go To Record/Request/Page where CONTACTID = get(scriptparameter) or alternatively where RECORDID = get(scriptparameter).

what has been happening for me is that, if GET(scriptparameter) has a value of "5", i am taken to record # 5 in the current found set which may or may not be the correct record, WHEREAS my objective is to be consistently taken to the record whose CONTACTID or RECORDID has the value of "5"

Background:

i'm setting up a contact database, where each contact has a auto generated serial number ..called ContactID. a contact may have an assistant, who basically is one of the contacts within the database.. so contact#99 may be contact#8's assistant.

the user selects the assistant name from a value list of all the contacts in the database. once the assistant name has been selected, the ContactID for the assistant is copied to the AssistantID field.

beside the assistant name on the layout, is a button which opens a new window called Assistant Detail which shows some information about the assistant. The AssistantID is passed to the script via the scriptparameter.

-----------------

Try the Script Step: Go To Related Record.

  • Author
  • Newbies

i tried that. it doesn't work.

.. in a nutshell, unless i have to, i don't want to use a self join or other type of relationship.. i would like to be able to view record number one, and from a button on that layout, open up a new window/layout and view record number two while still having record number one being open.

if i use Go To Related Record, then i would still be seeing record number one in the new window/layout, since without a self join/relationship, record number one is only related to itself.

logically i should be able to say Go To Record number two.. not just record number two in the current found set.. but whichever record has the RECORDID value of "2"

thanks.

.. in a nutshell, unless i have to, i don't want to use a self join or other type of relationship..

In a nutshell, you have to - if you want this to work. Why do you make it sound like a root-canal?

Define a self join relationship:

YourTable::AssistantID = YourTable 2::ContactID

Then, if you want the Assistant's record to appear in a new window, use:

Go to Related Record [From table: "YourTable 2" ; Using layout: <current layout> ; New window]

File attached with two example scripts, one using Get(ScriptParameter) and the other using Go To Related record.

Contacts.zip

  • Author
  • Newbies

thank you! it's not that i have anything about setting up the relationship, i just thought that their was another way to do it.

i've downloaded your sample file and see that it works. for some reason, it isn't working in my file, so i need to take another look at it.

thanks again.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.