on 2019 Sep 09 12:15 PM
Hi Experts,
I have a CDS view which comes as a drop down (combo box) by use of annotation -
@ObjectModel.resultSet: { sizeCategory: #XS }
However, it can still serve as a field available for user entry , due to which a user can remove the data from drop down. I would like to know how can I prevent user from removing the field value (making the value blank) i.e no other value except values in drop down should be a part of the field .
The application under consideration is a smart template app.
Kindly respond if you have a solution to such issue
Request clarification before answering.
why this bothers you?
if user try to put junk data in the filter, they just get no data.....
if it is for edit screen, you just give them error msg when saving....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jun Wu,
Yes, you are correct i can give them an error message while editing also. But, as per our requirement there are certain actions which are dependent on the drop down field value. If it is an invalid value, the actions should not be allowed.
Thanks & Regards
Surbhi Bansal
You can make it as a mandatory field using the annotations or in case of edit, you don't want user to remove the existing value, use the field control and disable that field.
OR am I missing something here?
Thanks,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mahesh Kumar Palavalli
It is a mandatory field. The user can change the value though but, I want the user to be able to select only on eof the values from drop down and not be able to edit the field by typing in.
Is there a way out?
Thank & Regards
Surbhi Bansal
Hi Surbhi Bansal,
Fiori element based ui will automatically through error in case if the user enters an incorrect value. i hope you've maintained all the relevant annotations like foreignkey.assocaiton
Thanks,
Mahesh
User | Count |
---|---|
78 | |
12 | |
8 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.