Forum Discussion

AmyChristensen1's avatar
AmyChristensen1
Qrew Trainee
10 months ago

Field value changes, record ID is constant - how to look up current field value?

I know I have to be making this too hard. I need to have a field pull the current numeric value in field 31 from record #1 of an unrelated table. There is no need for any other kind of relationship here, I just need the field in the table I'm working from to know what value is currently in that other specific, constant. table/record/field. I've tried every search term combination I can think of and I'm coming up empty.



------------------------------
Amy Christensen
------------------------------

4 Replies

  • If you want to avoid a relationships, just use this formula query. 

    ToText(GetFieldValues(GetRecord(1, [_DBID_YOUR_TABLE]), 31))

    Replace the DBID with the real DBID of the table with the field you want. (You can get the DBID from the bottom of the Advanced Settings of the table. I don't know why they hide it so well.)

    You can also replace ToText with ToNumber or whatever data type you need. Without any conversion the formula returns a textlist.



    ------------------------------
    gary
    ------------------------------
    • AmyChristensen1's avatar
      AmyChristensen1
      Qrew Trainee

      Thank you, this is precisely what I was looking for. I was getting tons of solutions for how to do a query when I just needed to go straight to a record. I just needed the right syntax. Much appreciated!



      ------------------------------
      Amy Christensen
      ------------------------------
  • I do this all the time.  I get that you don't need a relationship here, but that is the best way to handle this.  You can set it up in such a way that it isn't an issue.  I have a table called "app settings".  I created one record, Record ID#1, then took away my and everyone elses permissions to create new records for that table.  It will always just have one record.  Relate that table to your table (i'll call your table "jobs").  In the jobs table, find the foreign key, 'Related App Setting', and set the default value to 1.  From that point onward, every job record will be related to the app setting record correctly.  You can bring in child fields to your hearts delight.  There are a lot of other things you can do with this kind of setup.   



    ------------------------------
    Drew Voge
    ------------------------------
    • AmyChristensen1's avatar
      AmyChristensen1
      Qrew Trainee

      This is a great tip, and one I can see using going forward. You also made me realize that for unrelated reasons, shutting down access to add records on this table is something I absolutely needed to do regardless. It would have occurred to me eventually, but better sooner than later!



      ------------------------------
      Amy Christensen
      ------------------------------