4 Replies Latest reply on Mar 17, 2015 9:26 AM by AlbertVanReenen

    Using a variable to return to previously viewed record



      Using a variable to return to previously viewed record


      I hope someone can help. I have a magazine subscription database in which the main layout is for subscriber details. It contains a portal to related subscription information, which includes details of gift subscriptions (someone buying a subscription on behalf of someone else).

      In the portal, there is a button which takes me to the record for the person who has bought a gift subscription (still within the Subscribers layout); I'd like to be able to create a button to bring me back to the original subscriber record.

      Currently, the script to go to the buyer record includes a line which defines a global variable ($$current_subscriber) with the value of the subscriber number field in the Subscribers table before going to the related record. I do not know, however, if this variable is getting the correct value (does the fact that the subscriber number is a number, rather than text, make any difference?).

      I have a second script set up to get me back to the original record, which currently is as follows:

         Enter Find Mode []
         Set Field [Subscribers::Customer Number; $$current_subscriber]
         Perform Find []

      However, this is not working - the second script does enter find mode, but then I get an error message: "the provided find criteria is not valid. Enter a valid request before proceeding."

      Can anybody shed any light on what I might be doing wrong?