UI5 OData - Filter automatic READ call after Create - odata

Hi have developed an App with Planninng Calendar.
This is an example of my oData call when starting the App. Here I set some filters.
EmployeeSet?$skip=0&$top=1000&$filter=substringof(%2799999999%27,orgId)%20and%20startDate%20le%20datetime%272022-12-01T10%3a59%3a14%27%20and%20endDate%20ge%20datetime%272022-12-31T11%3a59%3a14%27&$expand=EmployeeToAppointment%2cEmployeeToSpecialDates
My poblem comes, after I add a new Appointment with method Create, the Calendar is refreshed and the READ method is called, but there is no filter, so all the data is read, without filtering. Is there any possibility to filter this automatic READ call?
Below is an example of the automatic READ call
GET EmployeeSet('00002889')/EmployeeToAppointment?$skip=0&$top=1000

Related

Microsoft Graph - Adding recurring event with exceptions

How can I add a recurring event with exceptions using the Microsoft Graph API?
Is this possible in Microsoft Graph at all?
Edit:
For instance, I want to create an event that will take place every Monday, starting 07/05/2021, but that will not occur on 07/12/2021.
I already know how to create the recurring event, but I don't know how to create it with this exception.
You first need to find the correct Event Instance you want to change.
/events/{id}/instances?startDateTime={dateTime}&endDateTime={dateTime}
This will return a list of instances within the specified date range. You then parse the list for the specific instance you want to obtain its unique id and delete it like any normal event.

Access call history in app for Microsoft Teams

While it seems it is not possible for an app to register incoming calls, I wondered if it would be possible to access the call history of the current user?
It looks like there is a Graph API to get information of a specific call by id, I didn't find anything about getting the call history or the last call.
This could be a workaround for our approach: We want to enable the employees to make several notes on incoming calls and reference them with existing items in another web application.
Is there any way to achieve what I'm trying to do?
There seems to be a new Preview way of and application subscribing to a call event though still no way to get the full history.
Application
CallRecords.Read.All:
Subscribe to new call records (POST /beta/subscriptions).
There are more details here https://learn.microsoft.com/en-us/graph/cloud-communications-callrecords but it suggests you could capture the incoming call and allow notes as you want.

V2 oData Read Batch Operation SAP UI5

I have two read odata(V2 Version) call for my application. For this, I have tried batch operation.
But I stuck somewhere. Because my second odata call input is depend on first odata call output. Is it possible to send the two calls at a time in batch(V2 Odata Model)?
Regards
Karthik S
It is not possible to group dependent calls into a single $batch.
But you may be able to design it better.
If the first call gets data from the backend which is input to the second call, why can't the second call fetch the same input data directly from backend instead of from output of the first call?

Rails providing search through API with themoviedb-api gem

I am creating movie/series focused web application. In this application users would be able to search through movies/series and subscribe them. I want to provide users with the movie/series search engine through API. In my app's database I have no information about movies/series, so when the users is typing title in the search field I need to send a search request to API to fetch movies/series that match the given pattern. The problem is that at this point I don't see any way of implementing this functionality. I thought about another controller e.i. Searcher. That's fine, but I would like to put this search field in my app's layout so it would be available everywhere not only for users that are on particular URL.
First have you an API key from IMDB API ? (https://github.com/18Months/themoviedb-api)
Make it a remote form and catch results through Ajax callback ajax:complete.
When a request is made, show a loader on the view to wait the time you call the api.
Call Your SearchController throught its route.
In your controller Search in you DB, if you do not find it, make an API call, save in DB and serve the result.
(Would be better to call the API in background, and serve results through Websockets but would be over-engineering right now.)

Insert rows into tables using OData POST

What is the standard method to insert data into a table, update a table, delete rows in a table using OData? My front end is SAP UI5 and the tables are stored on a HANA SYSTEM. Do i have to use a POST request and the use OData.create ?
I have as of now only exposed a table through the xsodata file and used the GET method for the Http request to display the records.
In my knowledge, it is not yet supported for an INSERT, UPDATE, and DELETE operation. The OData service is currently read-only as laid out here. You can of course create a workaround by writing a server-side Javascript that basically issues a SQL query from your GET request like this example.
In the meanwhile XS OData supports writing data. You can even add your validation logic before data is written to the database. Check the developer guide at help.sap.com/hana for details.
You need to do a POST to make either to do an Insert, a PUT to do the update and DELETE to remove the data.
On the ui5 side you need to attach the table to a model(ie. the URL of the table you are trying to call) and do a model.refresh() for your changes to be updated in the table.

Resources