Expand my Community achievements bar.

Join us for our Coffee Break Sweepstakes on July 16th! Come ask your questions or share your use cases on Creative Briefs for a chance to win a piece of Workfront swag!
SOLVED

Resrict data field character counts

Avatar

Level 3

Question to the community

Is it possible on custom forms to restrict the character count in the fields eg we have a field were a requester inserts an customiD that would like used eg partner50summer our system has a character limitation of 20 characters imposed, but the WF field allows more, this at time (even with the fact that we have help text stating it that a requested could type an iD with 25 characters in the field and that wouldnt be useable in our system. So if i could restrict the WF field so on 20 characters it stops letting them type into the field that would be amazing

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

There isn't currently a way to limit the character count within a custom field, however, you can create a calculated custom field that pulls in your original custom field to give the user a character count. You can then add a third custom field, that says something like "If calculated field > 20, please update custom field to less than 20 characters." 

It would look something like this:

  • Original custom field name = Custom ID
  • Calculated custom field #1 name = Character Count - Custom ID
  • Calculated custom field #1 calculation = LEN({DE:Custom ID})
  • Calculated custom field #2 name = Character Count
  • Calculated custom field #2 calculation = IF({DE:Character Count - Custom ID}>20,"Please update Custom ID to be less than 20 characters")

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

There isn't currently a way to limit the character count within a custom field, however, you can create a calculated custom field that pulls in your original custom field to give the user a character count. You can then add a third custom field, that says something like "If calculated field > 20, please update custom field to less than 20 characters." 

It would look something like this:

  • Original custom field name = Custom ID
  • Calculated custom field #1 name = Character Count - Custom ID
  • Calculated custom field #1 calculation = LEN({DE:Custom ID})
  • Calculated custom field #2 name = Character Count
  • Calculated custom field #2 calculation = IF({DE:Character Count - Custom ID}>20,"Please update Custom ID to be less than 20 characters")