4 Replies Latest reply on Jun 7, 2013 2:15 PM by JoeFlores

    Find or create script



      Find or create script


           Hello everyone.

           can anyone help? Here's the situation:

           I need a script that will perfom find request in one layout, if the record does not exist I will need it to be taken to another layout to enter a new record. 

           i.e. find customer in invoice layout, if customer does not exist, take me to customer layout and request new record.

           Hope this makes sence.

           Thank you: Joe






        • 1. Re: Find or create script

               While execute SQL may be able to do this, the results are all in one field. I'd take a look at setting up a summary report or multiple portals, or multiple executeSQL fields to get greater flexibility.

          • 2. Re: Find or create script

                 Can the monthly report look like this?

                 summerized by a field name service i.e

                 header MONTH and YEAR

                 Sub-summery sorted "type of service provided"

                   body or summer 'it can be in one field as long as it shows data from selected month and year' male:count | female:count | state:count | city:count

            • 3. Re: Find or create script

                   That sounds possible, though I don't see any real advantages to putting the different counts all in one field and it could make it difficult to properly display all the different counts for different states and different cities. I'd uise a separate Execute SQL field for each aggregate value or not use them at all and use other methods with relationships, filtered portals and/or summary fields to get the different values arranged in the needed rows and columns.

              • 4. Re: Find or create script

                     Never mind everyone I did it.