cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Error Message in Value Help

Former Member
0 Kudos

Hi,

In my application i have a Inputfield called "CLASS", for which i have added a value help..it has these values

B Business

E Economy

F First Class

When the user enters a value(say "X") other than B, E, and F, it displays a message

<b>String "X" does not match the enumeration</b>

I want to put my own message like " Please enter a valid value" instead of the above message.

Please let me know how to do this ?

Thanks

Senthil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Senthil,

I Think You can't change the default message.

If you want to have you custom message too for that Input Field, Check the Action Property for the Button Check Without Validation.

If you have very few values like (B,E,F..) , write your own logic to compare values.

Correct me, if i am wrong.

Regards,

DK.

Former Member
0 Kudos

Hi DK,

Just for simplicity sake i said i have 3 values,actually the list has 45 values which is coming from a Database.

Even i thought of looping through this 40 values and displaying some custom message, i just wanted to check with SDN gurus that if there are any simpler options rather than looping through the list and checking the user entered value with values in the list.

Thanks

Senthil

sridhar_k2
Active Contributor
0 Kudos

Hi Senthil,

If you dont want to keep the values, other than your model values, It is better to use Drop Down Box, instead of Input Field. There you can restrict the user to pass only the required Params.

Regards,

Sridhar

Former Member
0 Kudos

Senthil,

First, "looping through the list and checking the user entered value with values in the list" is possible only with non-validating actions. Using non-validating actions is a tricky task in real life.

Second, workarounds are possible, but they involves calculated attributes (like here: /people/valery.silaev/blog/2005/11/29/800format-your-way). Solving this problem generically (45 attributes is a good number to start with a generic solution) will result in solution with complexity comparable to this: https://weblogs.sdn.sap.com/pub/wlg/3309. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] Do you need such thing just to alter error message?

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi,

First i was using DropdownList by KEY only, end user said there should be provision for the user to enter the value in that field. Actually the field is Cost Center field,

some users are very familiar with cost center number, so instead of selecting a value from the list, they want to enter, so i used this value help...during unit testing i saw this message "String does not match the enumeration", so thought of changing this...thats the reason for this post.

Valery,

To change this message, it seems to be a lengthy work around. Any simpler suggestions ?

Is it possible to enter/select values in a DropDownList ?

I doubt.

Thanks

Senthil

Former Member
0 Kudos

Senthil,

<i>To change this message, it seems to be a lengthy work around. Any simpler suggestions ?</i>

Sadly, I've found nothing simpler

<i>Is it possible to enter/select values in a DropDownList ?</i>

No, the only workaround is InputField + EVS (the thing you are already using)

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com