Skip to main content
Question

Looking up a Field in a Different Table in the Same Application without a Relationship.

  • May 28, 2024
  • 0 replies
  • 495 views

Forum|alt.badge.img+5

Hello:

I have one application with many tables. The two tables in question are:

  1. Applications
  2. Student Demographics.

Applications Table Fields and Types:

  • Name (formula-text)
  • Phone Number (formula-text)
  • Email (formula-text)

Student Demographics Table Fields and Types:

  • Name (text)
  • Phone Number (number)
  • Email (email)

Values

  • Name Field ID: 7
  • Table Alias: [_DBID_STUDENT_DEMOGRAPHICS])
  • Table ID: btn82xxxx

Goal: I am trying to look up the name, phone, and email fields in the Student Demographics table and transfer the data to the Applications table (without a relationship) using a formula.

Challenge: I am receiving different error messages.

  • "Expecting text but found number."
  • "Expecting text but found record list."
  • GetRecord(7,[_DBID_STUDENT_DEMOGRAPHICS])
  • GetRecord(7,"btn82xxxx")

Questions:

  1. Am I using the correct function?
  2. Is the Record ID the same as the Field ID?
  3. Am I correct in selecting a formula-text field type for the phone number and email fields?

Thank you,

Roula

This topic has been closed for replies.

SSNJeffP
Forum|alt.badge.img+11
  • Registered
  • May 28, 2024

Hi Roula,

Record ID and Field ID are 2 different values.   Record ID is the entire record # and Field ID is the identifier for the field that value is stored in.

You need to add GetFieldValues to return the values from record #7 in this case:

GetFieldValues(GetRecord(7,[_DBID_STUDENT_DEMOGRAPHICS]),XX)

Where XX is the field ID of the field you want to return the values from.  

You may also need to wrap this whole formula in ToText:

ToText(GetFieldValues(GetRecord(7,[_DBID_STUDENT_DEMOGRAPHICS]),XX))

It seems that you probably also need to make a variable to get the correct record ID from your student demographics table.

Everything else should work,  your field type is correct and this should be the correct function.


You're almost there!