I want to be able to enter a MAC address into a field and have a lookup

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
During record creation or viewing (I don't mind) If I have a field which contacins a MAC address (i.e. 00:24:21:14:01:FD) then can I have that look up the first 8 characters to another table and display the match?



I know that I could split the field into FIELD 1 = 00:24:21 and FIELD 2 = 14:01:FD and have FIELD 1 as a fixed lookup list, but I would like to avoid this?
Photo of Jon

Jon

  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
The formula for the first 8 characters would be

Left([Mac Address],8)

So just use a field with that formula as your reference field to get the lookup of a table of those 8 character codes.
Photo of Jon

Jon

  • 0 Points
I get the Left function, thanks - Can you help me on how to lookup that value and link to a matching record in another table?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
You would need to set the Key field of that other table to be the MAC address.  Test this first in a copy of the app if you have never changed a Key field before.  But once that is done, then just make a relationship and use the formula field as the reference field on the right side of the relationship.
Photo of Jon

Jon

  • 0 Points
OK, key field set as the 6 digit mac prefix not eh mac table, but when I create the relationship from the devices table (many devices to one mac prefix) I cannot select the formula field (devices table LEFT (MAC FIELD, 6) to the 6 char MAC PREFIX FIELD in the MAC prefix table. AM I doing this the wrong way round - Sorry, really confused on how to do this!
Photo of Jon

Jon

  • 0 Points
OK, key field set as the 6 digit mac prefix not eh mac table, but when I create the relationship from the devices table (many devices to one mac prefix) I cannot select the formula field (devices table LEFT (MAC FIELD, 6) to the 6 char MAC PREFIX FIELD in the MAC prefix table. AM I doing this the wrong way round - Sorry, really confused on how to do this!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Can you double check that the Key field of the mac Address table is in fact the Mac first 6 characters field?  Does it have a gold key beside it?

Can you tell me what field type the details table has for that LEFT formula field.  is that a text formula field or a numeric formula field?
Photo of Jon

Jon

  • 0 Points
Thanks for your help - managed to get this resolved
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Great, thx for letting me know.