November 7, 201213 yr 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
November 20, 201213 yr "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
November 20, 201213 yr Halt Script Hi LaRetta, I do not understand why you placed that step. Is it really needed ?
November 20, 201213 yr You are right it isn't. I changed it partway through and it is difficult typing on iPad. I have corrected it.
Create an account or sign in to comment