mmonsalveg Posted May 27, 2012 Posted May 27, 2012 Hello , I would like to know how to set my script to go to specific layout if the last character of the field that im searching is 2? example: if im searching for " 2245-2" ... go to layout "2" if im searching for " 4587-3" .... go to layout " 3" hope you understand, thanks for your help. mauricio
doughemi Posted May 27, 2012 Posted May 27, 2012 If[Right(YourSearchField;1) = 2 Go to Layout("2") Else If (Right(YourSearchField; 1) = 3 Go to Layout"3") End If
Vaughan Posted May 27, 2012 Posted May 27, 2012 Your best bet is to use onRecordLoad script trigger to run a script that changes to the layout whenever the record changes (in browse mode). The script would be what doughemi posted above. Then, whenever the records are viewed the correct layout will be displayed *as you browse through them* automatically. This includes as they are viewed after a find. Having said that, why need separate layouts for something like this?
LaRetta Posted May 27, 2012 Posted May 27, 2012 You can also just use one script step in the OnRecordLoad trigger attached to the layout of: Go To Layout [ by calculation ; Right ( yourSearchField ; 1 )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now