Body: <p>This question is referring to the same example found here: <a href="https://civicrm.stackexchange.com/questions/45195/custom-logic-for-fields">Custom logic for fields</a></p>
  <p>One of the requirements for a project was for the system to generate a unique ID for each of the members coming in. The logic of the unique ID is slightly complex. The unique ID will take the first alphabet of the surname and increment the number after the alphabet. Example John Tan, membership number will be T001 (Tan is his surname). Another example Ryan Tay, membership number will be T002 (Tay is his surname). If name if Tristan Ram, membership number will be R001 (Ram is his surname).</p>
  <p>I've notice one of the commentor mention that we can use CiviRules to update the value, but it seems like the only action is to 'Update Numerical Value'. How can I implement this feature as mentioned above using CiviRules?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-04T08:26:49.777Z
Comments.Text: Please share with me if you have the answer. I am also finding a solution :)
Comments.UserDisplayName: Cas
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-04T09:13:45.847Z
Comments.Text: Just curious why you are both asking exactly the same question... is this for an interview?
Comments.UserDisplayName: Aidan
Tags: <civirules>
Title: Custom logic for fields using CiviRules
ThreadText: # Custom logic for fields using CiviRules
  
  (Asked by: username_0 on 2023-07-04)
  
  This question is referring to the same example found here: [Custom logic for fields](https://civicrm.stackexchange.com/questions/45195/custom-logic-for-fields)
  
  One of the requirements for a project was for the system to generate a unique ID for each of the members coming in. The logic of the unique ID is slightly complex. The unique ID will take the first alphabet of the surname and increment the number after the alphabet. Example John Tan, membership number will be T001 (Tan is his surname). Another example username_0 Tay, membership number will be T002 (Tay is his surname). If name if Tristan Ram, membership number will be R001 (Ram is his surname).
  
  I've notice one of the commentor mention that we can use CiviRules to update the value, but it seems like the only action is to 'Update Numerical Value'. How can I implement this feature as mentioned above using CiviRules?
  
  **Tags:** civirules
  
  > **Comments:**
  > **username_1**: Please share with me if you have the answer. I am also finding a solution :)  
  > **username_2**: Just curious why you are both asking exactly the same question... is this for an interview?  
  
  ---
  
  ## 0 answers
  
  