July 9, 200916 yr Hi, I would like to create a script that would perform a find whose criteria would be was is currently in a given field on the current record. Is this possible? Thanks.
July 9, 200916 yr Something like; Freeze Window Set Variable [ $Find; YourFindField ] Enter Find Mode [ ] Set Field [ YourFindField; $Find ] Perform Find [ ] HTH Lee
July 9, 200916 yr BTW you dont really need a script for this. You can just select the field that you want, right click and then choose 'Find MAtching Records'
July 9, 200916 yr Author It keeps telling me that ''No records match this set of find requests'' but this can't be true because if I go to find mode myself and type in a value, it finds the corresponding records. Any ideas? Thanks.
July 9, 200916 yr Author Here it is. The reason I can't simply right-click and select "Find matching records" is because I want the search to be performed on another layout. Freeze Window Set Variable [$Find; Value:equipment_list::el_equip_name] Go to Layout ["Inspection Issues" (inspection_issues)] Enter Find Mode [] Set Field [equipment_list::el_equip_name; "$Find"] Perform Find [] Thanks.
July 9, 200916 yr Maybe it's my tired eyes, but I don't see an error. Why not use Script Debuger step through your script to see what is isn't doing. Lee [color:red]p.s. You can also post a copy of your file here if you want Before you do, remove any confidential information, or post a no record clone. Edited July 9, 200916 yr by Guest p.s.
July 9, 200916 yr Are you sure about this: Freeze Window Set Variable [$Find; Value:equipment_list::el_equip_name] Go to Layout ["Inspection Issues" (inspection_issues)] Enter Find Mode [] Set Field [[color:red]equipment_list::el_equip_name; "$Find"] Perform Find []
July 9, 200916 yr You've switched to a new layout and new context, but the field that you reference is in the old context.
July 9, 200916 yr Also... Set Field [equipment_list::el_equip_name; [color:red]"$Find"] Get rid of the quotes.
July 9, 200916 yr What Barbara was trying to point out was that your script goes to a layout based on inspection_issues but you are searching for a value in the equipment_list table. Unless they are somehow related, you will not return the results that you want.
July 9, 200916 yr Nice catch John, I knew there was something that my eyes were not seeing. Hey [color:red]TDavidson, when you use a variable, it is like using a field, and you don't need to enclose it in quotes, i.e. just $Find, not "$Find". I think that your File Structure needs to be explained. If the two layout are two different Files, or TOs, you need to have a relationship in order for the script return anything. If on the other hand, they are both layouts in one TO, then you don't even have to change layouts, because the Set Field Script Step doesn't require the Field to be on the current layout, and you could then move the Go To Layout to after the Find has been performed. HTH Lee
July 10, 200916 yr Author I got rid of the quotes and it now works fine. There is a relationship between both table occurences so that shouldn't be a problem. Thank you so much for your help guys!
Create an account or sign in to comment