4 Replies Latest reply on Jul 4, 2013 10:35 AM by CraigFiore

    Multiple Script results



      Multiple Script results



           I hope someone can help me out.

           I have a script for emailing clients. The script has two options via "Show Custom Dialog". If I click Choice 1 it script goes in one direction and if I click Choice 2 it goes into another direction. My goal is to remove the "Show Custom dialog" and have it done automatically. 

           Is this possible?

           I attached a copy of my current script for review.




        • 1. Re: Multiple Script results

               I'm not sure I understand what you want. You can leave out the show custom dialog box, but the user wouldn't be able to abort.

          • 2. Re: Multiple Script results

                 If I turn off the custom dialog box off it will not sent an attachment with the email. I apologise, I have a hard time explaning. But let me try again.

                 We have a report we have to email off everyday. Sometimes there are photos anywhere from one to 20. For the phots I created a seperate Table and created a relationship. This Table is sorted by a Leading Sub-Summary.  This allows me to have 1 or 50 photos if i like. However, if there are zero photos for a report, the is an error because there is nothing to find. So, I created a seperate layout with out the Leading Sub Summary.

                 The only way I could get it to work was to put the custom dialog box in the script. So, now when there are zero photos a message pops up asking thme if they want to contiue with out photos. Which is alright. I would rathger not have the custom dialog box had have the script know what to do. 

                 If there are zero photos- go to layout A

                 If there are one or more photos- go to layout B

                 I hope this helps.


                 Thanks again,


            • 3. Re: Multiple Script results

                   I wouldn't use a find here since you already have a relationship setup. Create a summary field, click count, then select a field.  It really doesn't matter which field in the photo table you select.   This will give you the total number of photo avaliable based on the relationship.   Then in your script use this summary field in your if statement.  

                   The problem you are having is with your find statement.  If you correct that problem then your script would work without the custom dialog box.

              • 4. Re: Multiple Script results

                     Thank you for your help but while I was trying to your suggestion, and not completley understanding, I came across another way of working around the custom dialog box the. 

                     I used:  IF[Get(LastError)=401] 

                     Thank you for your help.