Forum Discussion

JohnLJohnL's avatar
JohnLJohnL
Qrew Trainee
6 years ago

How do I use the Record ID# as part of a field on that record.

I want to fill a Part Number field using the Record ID# as part of that field (i.e. "P" & [Record ID#]). The issue is, how do I save the record, grab the Record ID# and then update the Part Number field for that same record. I have tried using form rules but since there is no Record ID# until the record is saved, that did not work. I think that I likely need to use an automation but if I use "When a user adds a record", how do I run the automation on just the record that is saved?  
  • The Record ID# does not exist until the record is saved.  Just make a formula field.

    "P" & [Record ID#]

    Are you tryIng to make this the Key field of the table?  Is that your issue?
  • It will not be used as a Key field but in some cases, the Part Number field will be edited to an existing Part Number. The user can enter an existing Part Number or if left blank, I want to create a Part Number that is a concatenation of the letter "P" and the Record ID#. If I did not need to have an option for an existing Part Number, a formula field would be fine.
  • This is probably possible with an Automaton, but I suggest the using a Part # override field.  It's just less complicated that way and zero chance of failure.

    Then your Part# field will be a formula

    IF(Trim([Part # Override]<>"", [Part # Override],
      "P" & ToText([Record ID#]))
  • That does seem like a more direct way to accomplish the goal. Thanks for the advice.