Resrict data field character counts | Community
Skip to main content
Level 3
September 12, 2023
Solved

Resrict data field character counts

  • September 12, 2023
  • 1 reply
  • 708 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by NicholeVargas

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")

1 reply

NicholeVargas
Adobe Employee
NicholeVargasAdobe EmployeeAccepted solution
Adobe Employee
September 14, 2023

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")