12 Replies Latest reply on Jun 1, 2011 8:49 AM by philmodjunk

    Want to do a FedEx search from input on a portal.

    j_rameses

      Title

      Want to do a FedEx search from input on a portal.

      Post

      I have a layout called "clients". In there is a portal that retrieves data from a table called "Clients_Deliveries".  On that portal there is a button that takes them to a layout called "Clients_OrderForm".  There the user inputs data that goes to table "Clients_Deliveries" and several other tables.  From that layout, "Clients_OrderForm", the user clcikcs on Print or Close.  Which takes them back to the layout "Clients".  In the portal is some info for each individual record pertaining to that client.  I have an input field in that portal for the user to enter a FedEx tracking number.  When the user later wants to track the status of that package, there is a button next to it when they click it, it takes them to a layout called "FedEx Tracking" which should display the FedEx status of that package on the web page that opens up.  It opens up but I have two problems.

      1) If I enter a tracking number into the portal after a record was created for that user, when I click on the button to launch the layout "FedEx Tracking" to see the status of the tracking number, the value does not populate on the script.  I get a blank FedEx page.

      2) If I just enter a value in the FedEx tracking field without creating a record it places the value into the FedEx search when I click on the button to launch the layout "FedEx Tracking".  But when I click on a different record on the portal it uses the first record on the portal.

      I would like to enter a tracking number into the portal after the record has been created because we don't get a tracking number until a package has gone to shipping department.  Once they generate a tracking number they let us know and we enter it into the portal where the input field for FedEx Tracking number goes in.  Then later on when a user wants to check the status of certain record in the portal, it should use the corresponding value to the "Note #" of the record.  I want to mention that the "Note#" is a unique number and is a primary key.

      Please advise on how do I correct this? 

      Attached is an image of what part of the layout looks like.

      The "Start New Order" button launches the layout "Client Order Form" to enter the values needed for printing to include in shipment with package.

      The button on the left of the date, launches the same layout for viewing.

      The button underneath the "Track FedEx" label in the portal launches the layout "FedEx Tracking".  When they click on that button it should track the package for the corresponding tracking number to the Delivery#.  Some fields have been white out to protect our info.

      Untitled-1_copy.jpg

        • 1. Re: Want to do a FedEx search from input on a portal.
          philmodjunk

          We'd need to see your scripts to see why it might not be working. And do you have a web viewer to Fed Ex setup on your tracking layout?

          THere are several ways you can post your script without having to type in letter by letter:

          1. You can upload a screen shot by clicking the edit link to your original message and uploading it there
          2. You can upload a screen shot to a file share site and post the download link to a new response you post here.
          3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF.
          4. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
          • 2. Re: Want to do a FedEx search from input on a portal.
            j_rameses

            I changed the photo.

            • 3. Re: Want to do a FedEx search from input on a portal.
              philmodjunk

              Notice the URL expression that includes this text: "TrackNumbers = " & Clients_Deliveries::FedExTrackingNumber

              I can't tell exactly why from here, but it sounds like this value is accessible when you open the new window to your FedEx tracking layout.

              I can see that the layout is based on Clients, but this field is defined in a different table--probably your portal's table. The change in layout is breaking the connection to the portal row where you clicked to bring up this window and layout.

              Try using a layout based on clients_Deliveries for your tracking layout and then use Go To Related record to both open the new window and "go to" the related portal record where the tracking number was entered.

              • 4. Re: Want to do a FedEx search from input on a portal.
                j_rameses

                On the script I have the following added:

                Go to Layout [FedEx Tracking" (Clients_Deliveries)]

                Go to RelatedRecord [Show only related records; From table: "Clients_Deliveries"; Using Layout: "FedEx Tracking" (Clients_Deliveries)]

                Is this what you meant?

                • 5. Re: Want to do a FedEx search from input on a portal.
                  philmodjunk

                  Leave out the first line and just use Go To Related Record, with the new window option specified in the Go To Related Record step. Make this script be the script performed when you click a button in your portal.

                  • 6. Re: Want to do a FedEx search from input on a portal.
                    j_rameses

                    PhilModJunk,

                    I tried it as you suggested but it is still not taking the "FedEx Tracking Number" into the search.

                    When I click on the button it opens up the layout but it only loads up the FedEx page, it does not insert the tracking number.

                    The "Go To Related record" options are as follow:

                    Get Related Record from:Clients_Deliveries

                    Show Record using layout:FedEx Tracking

                    Result Options:Show only Related Records:Match Current Record Only

                    Whats weird is if I select a different field from the "Clients_Deliveries", it displays it.  It places that value in the search for the Web View of the layout "FedEx Tracking".

                    In layout mode it displays:http://www.fedex.com/Tracking?tracknumbers=2001

                    The "2001" is a value from a different field from the "Client_Deliveries".

                    If I choose the ""http://www.fedex.com/Tracking?" & "tracknumbers=" & Clients_Deliveries::FedExTrackingNumber" in the calculation field of the webview, it displays on the layout: http://www.fedex.com/Tracking?tracknumbers=

                    It does not pull up the value from the field.

                    Is it that the values entered into the FedEx Tracking # field in the portal is not saving the numbers or is it placing it someplace else?

                     

                    • 7. Re: Want to do a FedEx search from input on a portal.
                      philmodjunk

                      Go to the layout you posted in your first post.

                      Enter layout mode.

                      Double click the tracking field and confirm that this field is trully Clients_Deliveries::FedExTrackingNumber. You should see a dialog pop up with a drop down menu at the top. "Clients_Deliveries" should show in the drop down. FedExTrackingNumber should be highlighted.

                      • 8. Re: Want to do a FedEx search from input on a portal.
                        j_rameses

                        I confirmed it.  It is what you mentioned.

                        In the portal it displays the tracking numbers for the client.

                        But if I place a field on the side outside of the portal or on any layout, it does not display the tracking number.

                        I created a sample layout to see the table view data of the table Clients_Deliveries and it displays the tracking numbers.

                        I believe that when outside the portal without its corresponding "Delivery Note" number it displays nothing.

                        I think it needs a way to pull the tracking number to the corresponding "Delivery Note" number so it knows its related.

                        I was looking through a book I have on FM but it does not mention on how to do that.

                        • 9. Re: Want to do a FedEx search from input on a portal.
                          j_rameses

                          I think that when the button is clicked to display the layout "FedEx Tracking" it should pull the value from the portal record and place it a temporary field so the "FedEx Tracking" layout can reference that field instead and have the correct value, or in this case a value.

                          • 10. Re: Want to do a FedEx search from input on a portal.
                            philmodjunk

                            Two more things to check.

                            Enter layout mode on the above layout and look for the text displayed in the bottom left corner of the portal. What do you see there?

                            Go to your tracking layout and select "Layout setup...". What do you see in Show Records From?

                            • 11. Re: Want to do a FedEx search from input on a portal.
                              j_rameses

                              On the layout with the portal, I see "Clients_Deliveries"

                              On the "FedEx Tracking" layout, I see "Clients_Deliveries".

                              I just made a change on the layout where the portal is.

                              In layout mode, I double-clicked on the button.

                              The "Control:Button Setup" window popped up.

                              I changed it from "Perform Script" to "Navigation:Go to Related Record".

                              Then I clicked on the "Specify" button.

                              Then I selected "Client_Deliveries" from the option "Get Related Record From:

                              Then I selected "FedEx Tracking" from the option "Show record using layout:"

                              The I selected "Show only related records:Match current record only" from the "Results Option".

                              When I went to browse mode and clicked on the button to do the FedEx search it actually loaded the layout correctly with the correct tracking number.  That is weird that it worded there but not with a custom created script.

                              • 12. Re: Want to do a FedEx search from input on a portal.
                                philmodjunk

                                The script should have worked the same as the button option and this is a script I use all the time. The script should only have consisted of a single script step identical to the options you specified for your button in button setup...

                                "In the portal it displays the tracking numbers for the client, but if I place a field on the side outside of the portal or on any layout, it does not display the tracking number."

                                What happened there is that you have one Client record, but potentially many Client_Delieveries records. When the field is placed in the portal, you see all the related Client_Deliveries records, each with their own tracking number field. When you place it outside the portal, it displays the tracking number from the first related record--which in most cases would be the first record shown in your portal unless you've specified a sort order in portal set up that changes this order for your portal records.