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

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

Recommended Posts

  • Newbies
Posted

I have what I hope is simple problem. I have an application where data from a single table is displayed on two different tables. This was done to make the form easier to read.

Now, I have a script that runs when the user enters a particular value in a control on the first tab and should up fields on the second tab. So far, the only way I have been able to do this is by using the following combination of script commands:

Go To Field[Project::Project_TestDR]

Set Field By Name [ Project::Project_TestDR; 1 ]

Go To Field[Project::Project_TestDR]

Set Field By Name [ Project::Project_TestGSRF; 1 ]

Unfortunately, this has the side effect of switching the user to back tab in the middle of their own data entry efforts.

So, how do I set a field value (by the name of the field) when the fields are located on a different tab of the same layout?

Posted (edited)

Why are you using go to field; and why are you using set field by name? Neither are necessary. Just use set field:

Set Field [ Project::Project_TestDR; 1 ] 

Set Field [ Project::Project_TestGSRF; 1 ]

Edited by Guest
  • Newbies
Posted

Thanks for the fast reply!

I will give the Set Field command a try tomorrow. However, I'm curious to know why the Set Field by Name command didn't work. It seems to me that it should.

Posted (edited)

I will give the Set Field command a try tomorrow. However, I'm curious to know why the Set Field by Name command didn't work. It seems to me that it should.

Well; definitely not. That is - of course it DOES work; but not the way you think it does.

What is the purpose of the "set field by name" command?

The purpose is "indirection".

You supply a valid, fully qualified field name as text; and a value to place in that field.

You wrote this:

Set Field By Name [ Project::Project_TestDR; 1 ]

What that says is:

Read the value stored in field Project::Project_TestDR

Whatever you find there is the name of the field we are going to set.

Set that field to 1.

Edited by Guest

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