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

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

Recommended Posts

Posted

Hi,

This one should be easy but when you are new its not easy.

This is the crime scene: let’s say I have 2 tables, tab1 and tab2.

Tab1

ID_Tab1

FK_Tab2

Name

Date

Tel

Tab2

ID_Tab2

Day

Hour

I need to get some info from the tab 2 based on the local variable: $ID. This variable is equal to FK_Tab2 so $ID = FK_Tab2 = ID_Tab2. From the script, I need to find the record with the key $ID=FK_Tab2=ID_Tab2 and get the rest of the info.

How do I find the record based on the value of $ID ??

thank you ...

Posted

If these two tables are already related, try using the Go to Related Record script step and you won't need a variable or any other script steps. Otherwise, you could create a script like this:

Set Variable [$ID; Value: FK_Tab2]

Go to Layout ["Tab 1"]

Enter Find Mode []

Set Field [Tab1_Field; $ID]

Perform Find []

Posted

I owe you a beer … It worked the way I expected though I slightly modified the script. All tables are related but on the layout I have 2 tables the main – tbCours and in the portal - tbHoraireCours. I use a script to do some math based on the values from the layout. In the script I need to get the key from the portal (tbHoraireCours), go with this key to the tab tbPlageHoraire, find the rest of the info, do some math and with the result of all of this, go to 4th table (tbCalendrierCours) and make a new record.

Now I can continue this was just a part of the rest.

Thanx again…

relationships.gif

script.gif

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