What is your main parent layout based on?
Layout with the portal is "Front Page" based on Front Page table.
Layout with the Shop Names is "Shop" based on Shops table.
Layout to perform search is "Face Sheet" based on "Face Sheet" table.
Hope that helps.
Well you can pass the name as a script parameter when you specify the script for the button. Shops::ShopName
Go to Layout [ Face Sheet ]
Enter Find Mode [ ]
Set Field [ Face Sheet::ShopName; Get ( ScriptParameter ) ]
Perform Find [ ]
That being said, I dont realyl follow your structure so I cant advise on a clearer solution.
I'm getting a "Operation (e.g.+,-,*....) is expected here, and Get ( ScriptParameter ) ] ends up being highlighted.
There are two layouts that work together. "Shop" layout fill info some fields on the "face sheet" using a relationship. Since face sheet has all the records of different shops I want to create a sort so managing spread sheet print outs are easer with less clicks and a Front Page layout that you can do this from.
So the goal is if I want to print out everyone from shop "A" it would be ideal if I can highlight a Shop from the portal, click on a button "view" and I get a spread sheet view of only people in Shop A. So the Front Page layout takes the "Shop Name" within the portal, goes to the Face sheet layout, enters find mode, goes to the Shop field, enters the Shop Name, and performs find. (or so that is how I envision it)
Hopes that helps.
First you probably are putting in the Get ( ScriptParameter ) in the repetition field in the Set Field step. It should be in the Calcuated result section.
Also, from your further description it seems as though you probably can do this using a Go to Related Records script called from the portal.
I'm now getting "no valid criteria found"
You did pass the parameter when you specified the script correct?
I'm sorry, but I have no clue what you mean by that.
Like did it try to perform the find? It did, and came back with nothing.
If this helps,
The field in Face sheet is named "Shop_Look_up" That is where the search should be preformed.
The field from "Shops" table is named "Shop Name"
And what does Get ( ScriptParameter ) do?
Its gets the Script Parameter that you pass when you call the script.
When you go to specify a script such as when you put a button on the layout, you will see an area towards the bottom that says something like optional script parameter. This is where you pass the parameter.
Then in your script that you spcify, the script step of Get ( ScriptParameter ) will gran whatever value you passed.
For example, lets say you have a simple script that has one script step in it of Show Custom Dialog.
Specify in the message field Get (ScriptParameter).
Now put 3 buttons on the layout each calling the same script. However, when you go to pick the script put "blue" for the optional script parameter for button1, "red" for the optional script parameter for button2, and "green" for the optional script parameter for button3.
Now you should see that even though you only have 1 script, passing a different parameter to it will show you a different message.
I kept looking in Manage scripts.
All better now and works exactly how I want it thanks!!