In logic what conditions should I give for If condition to get validation message if character is less than 23.Currently I am giving the below condition and it is not working. If I enter value which is equal to 23 then also it is throwing error message.
Length(GetRepeatedCodes.List.Current.ServiceModel.ProductHierarchy) < 23
( Service Model is entity and Product Hierarchy is its attribute ).
Can you suggest me with proper validation condition in If ?
Hi, read this:
https://success.outsystems.com/documentation/11/developing_an_application/design_ui/forms/validate_the_fields_of_a_form/
May be u forget to check if the form is valid or not:
Thanks @ibox ! It worked. That validation document is really helpful.
Mark then this question as Solved, tq
Hi,
If you want to check it is less than or equal to 23.
Then use, Length(GetRepeatedCodes.List.Current.ServiceModel.ProductHierarchy) < =23
Also Can you upload the text here which you are getting in "GetRepeatedCodes.List.Current.ServiceModel.ProductHierarchy"
Regards,
Wasimkhan S
It is not giving back any text.
Can you share the screenshot of your code or an OML would be helpful to look into it
Due to security reasons I can't share my OML. Below is the attached screenshot of basic structure which I am approaching.
Hello Rajshree
have you this condition
Length(GetStores.List.Current.Country.DialCode)<=23
For the entity "country", the attribute is "dial code". It only works if the number is greater than or equal to 23.
can you share the datatype of Product Hierarchy
Regards
Nikhil kumar vijay
My condition is -
Requirement - It will throw error when length is less than 23 characters. If it is equal to 23 then it should accept the value.
Product Hierarchy is of Text data type.
Can you check the Branch you are navigating to the correct branch in If.
I am applying the same. If the length is less than 23, I am assigning validation message to it otherwise it is getting towards end.
This is the structure I am following.
Can you share the value you are passing.
If you want to show the validation message in front end. I think you need to Ajax refresh the widget.
https://success.outsystems.com/documentation/11/reference/outsystems_language/traditional_web/web_logic_tools/ajax_refresh/
Regards, Wasimkhan S
I am giving two assignments -
Value.Valid = False
Value.ValidationMessage = "Value must be of 23 characters"
Like this? Also can you debug it, in which flow it is going?
Regards,Wasimkhan S
Hi Rajshree,
Check this linkhttps://success.outsystems.com/documentation/11/developing_an_application/design_ui/patterns/using_traditional_web_patterns/utilities/character_count/
you can use this to count the character.
Thanks