Skip to Content
0

Mandatory selection field is not working in Fiori List report

Feb 05 at 04:07 PM

259

avatar image

Hi Experts, I need a help. I have created a fiori list report app, where I'm consuming Odata service originated from CDS view (@OData.publish:true). In the list report I made a selection field plant as mandatory but when I press Go, it shows me all the records instead of asking for mandatory field plant...please suggest if you have any idea on the same.

My Development Approach

1- Created a CDS view and OData service from the same view using Odata annoation.

2- OData service is filterable when I pass plant in URI

3- I consumed same OData service and created a Fiori List report app in webide.

4- In UI adaptation editor I made plant field mandatory, but when I'm pressing Go, it's showing me all the records instead of asking for mandatory field plant.

5- Another issue is when I download the file in excel as a standard option, data doesnt com in proper format.

Please guide me what needs to be done.

Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Neil Ward Feb 06 at 11:08 AM
0

If memory serves me correct, the 'required' parameter in the ui editor (view) doesn't actually make the field mandatory, it just puts the required indicator ( * ) on the screen. You have to code the field as mandatory.

Looks like you're using fiori elements so you could use a ui annotation in your CDS to make it mandatory.

something like

@Consumption.filter:{ mandatory:true }

good luck!

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks Neil, your one line annotation worked for me. Thanks alot for the suggestion. I would request you if you can suggest any blog or source where I can learn more about annotations.

I have one more issue in same Fiori app, when I download it in excel, data doesn't come properly, please advice if you have any idea on the same.

Regards

0

How to do that if we are not using CDS view??

There's a lot of information how to do this but only on Eclipse or with an OData with CDS....

How to apply this if we are using an OData not built with CDS or annotations...

0
avatar image
Former Member May 11 at 06:39 PM
0

Hi Neil,

The mandatory field validation works fine for the main page. I tried to do that in Object page using local Facet annotation, it did not work there for creating operation.

Can you please help me on that?

Thanks

Angshuman

Share
10 |10000 characters needed characters left characters exceeded