7 Replies Latest reply on Aug 26, 2010 10:32 AM by philmodjunk

    County script

    DawnPaquette

      Title

      County script

      Post

      I have set up a field called county with a drop down value list for selecting the county i need for a customer.

      i then started a table of counties same list as the value list.

      i have a button i wish to script:

      the following script is what i have started:

      If [Customer::County = County:: Citrus]

      Go to Layout ["Citrus"(Citrus)]

      ElseIf [Customer::County = County::Dixie]

      Go to Layout ["Dixie"(Dixie)]

      EndIf

       

      now the first option of citrus seems to be working but not the dixie and i have more counties to add.

      Any help is appreciated.

        • 1. Re: County script
          philmodjunk

          There are many questions that come to mind about your design:

          Why do you have separate fields in County for each county instead of separate records?

          The expression:  Customer::County = County::Citrus compares the contents of the field named "county" in the customer table with the contents of a field named "citrus" in a related record in the County table. Is that what you wanted here?

          Also, you are comparing a field in one table, Customer, with a field in another table, County. What's the relationship that links these two tables? (You may be matching to a different record in County than you thought.)

          Why do you need a separate layout for each count? (or are these groups of counties?)

          • 2. Re: County script
            DawnPaquette

            Im not sure that what i have is the good way of doing things to answer some of your questions.

            the ultimate goal is each customer gets a county field. then when i click on a button it brings me to a layout that shows documents and buttons for 2 other layouts for web viewing at least 2 different web sites.

            if there is a way to use less layouts then 3 per each county i would perfer that option: right now the layout for any county will need 2 web viewers (2 more layouts) and 3 container fields for documents.

            the current set up between customer county = County county in the County county i have seperate fields naming the individual counties ie citrus and dixie etc..

            • 3. Re: County script
              philmodjunk

              if there is a way to use less layouts then 3 per each county i would perfer that option: right now the layout for any county will need 2 web viewers (2 more layouts) and 3 container fields for documents.

              It should be possible to use the same layouts for each county and just refer to different records and web viewer URL's to pull up the appropriate data for that county. The only reason I can think of for having different layouts for each county would be if you had no choice but to use very different layout designs for each--which seems unlikely here.

              the current set up between customer county = County county in the County county i have seperate fields naming the individual counties ie citrus and dixie etc..

              I'm afraid I can't follow that. You select "Dixie" in the Customer::County field, which matches it to a record in County::County that also has "Dixie" in it and then you also have a field in the record named "Dixie"??? There seems to be a bit of confusion about the name of a field and the value it stores.

              • 4. Re: County script
                DawnPaquette

                No the layouts are pretty much the same for viewing the web sites i just cant figure how to make it select the correct web site without manual selection.

                the customer county and county county seems redundant to me also.

                to the basics then:

                customer account has a county with a drop down list selecting from a value list of counties. that is set and is working properly

                from there i need a script that reads the county name and displays the correct container fields and webviews.

                this is most of my sticking point i think

                • 5. Re: County script
                  philmodjunk

                  Web viewers can be set up so that the URL used is taken from a field of the current record.

                  For an example, download my Known Bugs List database, click the Bug Report button and then check out the web viewer on the Web tab. If you double click this web viewer while in layout mode, you'll see that the web viewer refers to a different URL for each record. Thus, each bug report record displays a different web page specified by a field in its record.

                  Your container fields should be in your county table so that when you select a county, the related container fields show the images/files appropriate for that county.

                  "the customer county and county county seems redundant to me also"

                  That part seems exactly right. What appears nonsensical is adding separate fields for each county name within the record. Your county table should have one record for each county and you can define any fields you need for data, such as your container fields, specific to that county. The URLs for any county specific web sites would also be stored in this table.

                  • 6. Re: County script
                    DawnPaquette

                    i have tried multiple times to download that linked known bugs list but no file is actually transferred.

                    • 7. Re: County script
                      philmodjunk

                      Did you click the blue download button?

                      It should take you to a page where they make you wait 20 seconds for a download link while they advertise their services to you. Then the link appears "Download File Now" that you can click to start the actual download.

                      I just tested the link in my post and it's working as expected.