2 Replies Latest reply on Jul 26, 2017 9:01 AM by hsutton47

    Script to Insert Today's Date Updating Browsed Records Instead of Selected Record

    hsutton47

      I created a pop-over button to update fields called Netflix Status (On Order, Shipped, On Site, Returned) which updates one of 3 date fields depending on status selected (Shipped Date, Received Date (On Site), Returned Date).

       

      For this example I have two records browsed where Netflix Status is On Order.  When a title arrives, I select the applicable record from the two records browsed, and use the pop-over button to change the Netflix Status from On Order to On Site.  By selected that status, I have a triggered script that selects the Netflix Received Date to today's date by default.

       

      Problem is, the script is updating that field in both browsed records, not just the record currently selected.

       

      I also have a custom dialog box pop-up with the current date filled in by that script giving me the option to change the date.  If I change the date, it only changes the currently selected record which is what the script triggered on the pop-over button should have done.

       

      Screen shots follow.

       

      1. Browsed records - two titles with Netflix Status="On Order"

       

      2.  Clicked on pop-over button to update Netfilx Status:

       

       

      3.  Clicked on pop-over button showing selection options for Netfilx Status field:

       

       

      4.  Selected Netfilx Status of "On Site" which triggered script to fill-in the Netfilx Receive Date field with today's date as a default.  But notice the script updated both records being browsed with today's date, not just the selected (active) record.  Custom dialog box also appears with the date filled in with option to change today's date. (This is an older step before upgrading from FM 10 to 15 where I learned about the new pop-over feature.)  But in this test, I wanted to keep it there to edit the date field to a different date (8/1/17) in next snapshot.  Wanted to see if this also updated the other record.  As I would expect, editing the custom dialog box to 8/1/17 only updates the Netfilx Received Date field of the currently selected record.

       

       

      5.  Editing default (today's) date with 8/1/17.

       

       

      6.  Result only updated Netfilx Receive Date in currently selected record.

       

       

      7.  Script that is triggered by updating Netfilx Status in pop-over window.  The lines that are applicable to this example are lines 5-7.  Cannot figure out why this action changed both records' Netflix Receive Date instead of only the selected active record.

       

       

      8.  Selecting pop-over button to display Set Script Triggers settings)

       

       

       

      9.  Set Script Triggers settings

       

      Thanks for reading and any assistance/advice.