Hi all,We have a business requirement where the user will enter data into a text field and if the data reaches a certain character limit say 100, we should not allow users to type more than 100. Like they want it to be freezed or stopped at 100 character length? We are showing character limit validation but they want some kind of restriction. Is it possible to achieve to such feature?
Discussion posts and replies are publicly visible
You can try using the below code:
a!localVariables( local!description, a!textField( label: "Description", instructions: "You can only add 100 characters in this field, system will auto trim the characters after 100th character", value: local!description, saveInto: { a!save(local!description, left(save!value, 100)) } ) )
This way it will never throw the validation but auto trim the characters after 100.
Harsh Kumar Agarwal , we tried the same but you can enter the data after 100 also. Unless there is a key press, it will continue to allow and only when a key is pressed, the save will execute and that is something which business wont accept.
This is a really specific case
You can discuss with business why they want it specifically and then push back explaining the behaviour of Appian components.