Misc Tips and trix

Quering database sysdate

In case database sysdate is required one option is to use projections WorkTasksHandling, function GetSiteDate. Other methods may exist..

Handling dates

Dates sent to IFS generally must be in the format YYYY-DD-MMTHH:MI:SSZ

Finding the correct projection

if you don't know which Aurena page that have the information you're looking for; try searching for the Projection Name or the Projection Description in the API Explorer for keywords and you often find the Projection you need.

Read-operation - Request $count

In Read operation you can request count of the returned entity set from IFS.

This option is not supported by all endpoint but if it is, response will include TotalCount attribute. Notice that this value is not dependent of the top/skip values added to operation.

You can always use the Flow Count() function to count the response rows

Create-operation, using default values

If you need to get default values for a Create operation use (if exists) <Entity>_Default (from set) operation. Use the def values in Create operation machine step and set the iterator to make parameter assignment easier.

In example below, result of operation <Entity>_Default (from set) is transformed to table and used as iterator in step for adding default values a bit faster. If several entities would be added in one call, add the entity specific values to the iterator table in flow script before Create operation.

Inspecting metadata to check allowed $filter values in LOVs

When filtering on a attribute that is of type Enum it possible to check the Projection metadata to check which values are allowed.

In each response there's a JSON tag that is named @odata.contex. Following this link will give you the metadata of the projection. Then you can search the XML file for the attribute you are looking for:

You can also add the $metadata tag to any Projection URL.

To quickly copy the OData requests URL in multiple rows windows in IFS Aurena there's a "Copy data link" option in the search bar above every list or multiple row windows in Aurena. If you perform a search the link will also include the filters and select conditions.

What you get in the clipboard:

https://z103labb004.novacura.com/main/ifsapplications/projection/v1/CompaniesHandling.svc/CompanySet?$select=Company,Name,AssociationNo,DefaultLanguage,Country,Logotype,CreationDate,FromCompany,FromTemplateId,TemplateCompany,MasterCompany,CreatedBy,LocalizationCountry&$format=json

Developing OData Flows often result in multiple calls to fetch the dataset you need. Instead of putting the calls machine steps in sequential order in the Flow you can group calls that are related and connect them with data arrows. When dataset is fetched and merged, connect the data arrow to the Flow.

Last updated