cancel
Showing results for 
Search instead for 
Did you mean: 

Field validation in Screen Personas 2.0 (SP2)

Former Member
0 Kudos

Trying to make text fields mandatory, I am using the Properties IsRequired (in combination with IsRecommended).

SAP Help says: IsRequired = Indicates whether user input is required for specified field. It is not possible to leave the current screen if at least on required field is not entered.

The values set to TRUE do not seem to make the fields mandatory for input.

More info: it's a textfield, created in Personas. The 'checkmark' to indicate it's mandatory is shown.

Saving the transaction without entering a value is possible without warning.

Anyone who can point me at the right direction?

best regards,

Joost Hart

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

This property (similar to "Numeric") is not operational. All what IsRequired does right now is put a checkmark into the field to make it appear as required. However the Personas client does not enforce this, just like a field that's marked "Numeric" will allow any input, not just numbers.

I already logged this as a bug internally at SAP, hopefully this will be addressed in the (not too distant) future.

Just about the only thing you can do is check required fields via a script - which is certainly a pain to do. It is not even always possible, for instance when pressing ENTER takes the user to the subsequent screen. Then the script won't be processed.

I'm certainly aware that you could link the script button to a field thus press it upon hitting ENTER but if the cursor isn't focused on an input field or some other button is pressed, then the link is ignored, so this wouldn't work.

Former Member
0 Kudos

thanks Tamas,

hrmz. for the time being (untill the expected functionality is working), I think I create a hidden script for field validation and replace the save button with a new button that first runs the validation script and after empty errors executes the save.

Answers (1)

Answers (1)

Former Member
0 Kudos

I created a script just before save to check the required fields if they were empty. Each mandatory field that was empty is added to a counter, that needs to be zero before Save is possible.

Script also shows a Q in wingdings font (a error-cross) on the empty field.

Pro - nice looking

Pro - option to guide user with specific error message on context

Con - hard to get stable (not always all fields are checked correctly)

Con - performance. Each field validation requires a few line of scripting; you notice it per field that performance is dropping.

Challenge - check all type of fields (cross tab, SAP standard fields and Personas custom fields)