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

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

Recommended Posts

Posted (edited)

In Scriptmaker, is there a way to use the contents of a global field as the query for a find request? How do I do this?

Or is the answer right under my nose?

Thanks all -

Daniel

Edited by Guest
Posted

If data is entered into the globals while in Browse Mode, you can use that data in Find Mode to set criteria into fields. The script steps are pretty straight forward:

//Assume gSalesperson is a global with a value already set

Enter Find Mode []

Set Field [ Salesperson ; gSalesperson ]

Perform Find []

Posted

Yup. If I understand the question the answer is pretty simple.

1. Create a field in either that same table you are searching or another table. Format it as TEXT type (I assume) and set the storage as GLOBAL. In this example I'm calling it:

TempText1

2. Make a script something like this:

Show Custom Dialog [Table::TempText1]*

Enter Find Mode []

Set Field [Table::YourNormalField; Table::TempText1]

Perform Find []

*When you're setting up the custom dialog you will need to use an input field. See the INPUT FIELD tab. It is there where you will specify the Table::TempText1 field.

This script is the bare minimum. You may want to consider error handling too but this example should get you on your way.

Posted

Thanks, guys - worked like a charm. Now I find myself with another problem, though:

My global field will include the name of another field. How, in my script, do I go to that field?

If it were a one-time thing, I would just hard-code the field into the script. But the field that I want to go to will change every time.

Posted

Ender, you're showing your age; I thought you were a youngster... I was just thinking; agent 99 IS probably 99 now!

Posted

Naw, I was just glued to the re-runs back in my childhood. I liked how the doors opened & closed at the start & end of every show.

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