3 Replies Latest reply on Dec 13, 2014 10:58 AM by philmodjunk

    RecordID, CurrentRecord

    SkipperID

      Title

      RecordID, CurrentRecord

      Post

      Hello Filemakers!

      I've created a button on most layouts that goes to a table and creates a "Help Ticket" for some of my users. 
      Basically, it means "I was trying to enter this data and I have a question on this record or layout" 

      The button Script does:

      SetVariable[$TroubleTable; Value:Get(LayoutTableName)]
      SetVariable[$TroubleLayout; Value:Get(LayoutName)]
      SetVariable[$TroubleRecord; Value:Get(RecordID)]

      then, (summarized) Create a New Window, Go to the TroubleTicket Layout, Create New Record and:

      Set Field [TROUBLE::CurrentTable; $TroubleTable]
      Set Field [TROUBLE::CurrentLayout; $TroubleLayout]
      Set Field [TROUBLE::CurrentRecord; $TroubleRecord]

      I don't think Get(RecordID) is the right function to be using. Or Get(CurrentRecord)
      I want it to return the value in the ID field that I have created (TableName:ID), But the Value in the CurrentRecord field is a number instead of the text+serialnumber in the field
       
      Every table has an ID field, (auto generated, serial #) am I cheating by asking this script to use the "ID" no matter what the table is without setting the table name and field? Somehow I think I need to be more specific about the field. 
       
      Any advice to get that ID from a field in any table? 
      Thanks!

      FM13