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

Generic Script for find to layout


z178

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

Recommended Posts

I have a database with 3 item priorities - Very Urgent, Normal and Low.

I was trying to create a script to perform a find and go to a layout to show items in list view.

Rather than making 3 separate scripts, I thought I could use a generic script which gets one of the values - Very Urgent/Normal/Low and perform the script.

In Myscript I have 2 steps

1. Perform find (Criteria set to MyDatabase::Priority[Get(Script parameter)]

2. Go to Layout["List View"]

At the button setup screen, I do this

1. Perform script ["MyScript"; Parameter:"Very Urgent"]

when run I get "No matching records found"

Whats wrong here? Am I doing it correctly?

Edited by Guest
Clarification
Link to comment
Share on other sites

You can not use neither scriptparamters nor $variables inside a prefab request, if you after the scripting issue a Modify Last Find, will you see the translation is "forgotten"

I would do it this way:


Set Error Capture [ On ] 

Enter Find Mode [  ] 

Go to Field [  ] [ Select/perform ] 

Go to Next Field 

Set Field [ Get ( ScriptParameter ) ] 

Perform Find [  ] 

Set Error Capture [ Off ] 

It will set you request value in the first field occuring in the taborder on the layout.

--sd

Link to comment
Share on other sites

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