scchoi Posted November 7, 2012 Posted November 7, 2012 Currently I'm working to create a script that will help me navigate from my default page to other layouts with certain conditions. So I've created a field where I calculated the number of records sorted by a category (type) My goal here is to have a script with the following conditions: - If only one stamp is found, show in detail view - If more than one stamp is found, show in list view - If there are no stamps for that type, alert the user and stay on Dashboard layout so currently i have something along the lines of : the screen shot attached. Suggestions on how to proceed? Do I need to set variables here? edit: sorry move go to related record so that it's placed ontop of end if
LaRetta Posted November 20, 2012 Posted November 20, 2012 "So I've created a field where I calculated the number of records sorted by a category (type)" Way wrong, I'm afraid. :-) After you perform your find, count the number of records returned and act accordingly similar to: ... Your find here and then continue with this pseudo-script ... Set Error Capture [ On ] Perform Find [] If [ not Get ( FoundCount ) ] ... no records found Show Custom Dialog [ "No records found" ] Go to layout [ original layout ] Else If [ Get ( FoundCount ) = 1 ] Go To Layout [ form view ] Else Go To Layout [ list view ] End If
Raybaudi Posted November 20, 2012 Posted November 20, 2012 Halt Script Hi LaRetta, I do not understand why you placed that step. Is it really needed ?
LaRetta Posted November 20, 2012 Posted November 20, 2012 You are right it isn't. I changed it partway through and it is difficult typing on iPad. I have corrected it.
Recommended Posts
This topic is 4386 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 accountSign in
Already have an account? Sign in here.
Sign In Now