on 09-29-2016 8:55 AM
Hi,
I have a scenario where i have 3 inputs from SAPUI5 application and all of them are optional.
In input parameters if i deselect the "is Mandatory" check box i need to provide a default value which would be used to fetch data incase no input was passsed from UI.
But in my scenario if input is not passed from UI entire data set has to be displayed in the front end. So i went ahead and created variables for the columns. I am unable to find how to pass the variable values in the ODATA URL
I have gone through this thread which says it was not possible back in 2014 any changes after that ? If not is there a work around.
I am currently working on SAP HCP.
BR
Madhusudan
,
Hi Mate,
I am not sure if you have any option to change the UI5 call - if you have then you could consider making the check there and/or use a filter option in oData ($filter=).
You can check this direct on the XS server by accessing the URL for your oData service - below you will see me accessing one we have at the moment with a argument for selecting a project.
<prot>://<host>:<xsport>/projectDetails.xsodata/projectDetails/?$format=json&$filter=startswith(projectID,'PI.20193')
Using the startswith and leaving the identifier - in the case above projectID blank - startswith(projectID,'') should return all entries.
You can have multiple filters separated by the word "and" like this where I select all projects that are editable(a field in my table)
&$filter=startswith(projectID,'') and startswith(editable,'true')
You can see other options here : Using Filter Expressions in OData URIs and here URI Conventions (OData Version 2.0) &middot; OData - the Best Way to REST
/MiB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.