I am looking to filter an odata request within power automate to return only records where the modifiedon date is greater than a specified value. I have thus far tried the following without success:

 

$filter=ModifiedOn%20gt%20datetime'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20cast('2023-05-23T00:00:00.0000000Z','Edm.DateTimeOffset')

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "innererror": { "message": "The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "innererror": { "message": "A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20datetimeoffset'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

Any suggestions for how to achieve this would be much appreciated. Thanks.

Like 0

Like

1 comments

This works for me

$filter=ModifiedOn gt 2024-05-14T00:00:00Z

I don't know if there is something specific for power automate, but in just accessing the Creatio odata api this is valid.

Ryan

Show all comments

Hi Community,

We have a simple string field in one of our Creatio instances that is not being updated (tested with a Supervisor user).

Field is NOT being updated in the following scenarios

1- Frontend: When we save the record page.

2- Application Layer : The field is not being update from Bussines Processes.

3- OData4 : We tried to update from Postman with OData4 request, without success

 

Is there any lock mechanism that prevents the field from being updated written in CSharp?

 

The field can only be updated when we perform an Update directly in the database layer.

 

Thank you

Sasor

Like 0

Like

1 comments

Hello!

 

This means that there can be logic at the event layer level that changes the value of this field when saving a record. It can be on action: OnUpdating, OnSaving. Details here:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Or changing a given field leads to another action that changes its value again.

To track exactly where this field changes, you can write additional logging when the record is saving, in various methods, such as OnUpdating and OnSaving, on the EntityEventListener. This logging will help you find exactly where the field value changes.

Show all comments

Hi Community,

In the OData4 protocol the maxTopLimit parameter

defines the limit for the value in the maximum number of rows in the output (which is 20.000 records)

We are retrieving the data from the Accounts table which has around 40.000 records.

What is the workaround or fix for this scenario?

Sasor

Like 0

Like

1 comments
Best reply

You can use the $top and $skip parameters to retrieve the data in pages. 

For example: 

Page 1 (first 1000)

https://creatiourl/0/odata/contacts?$top=1000&$skip=0

Page 2 (next 1000) 

https://creatiourl/0/odata/contacts?$top=1000&$skip=1000

Page 3 (next 1000) 

https://creatiourl/0/odata/contacts?$top=1000&$skip=2000

etc

Ryan

You can use the $top and $skip parameters to retrieve the data in pages. 

For example: 

Page 1 (first 1000)

https://creatiourl/0/odata/contacts?$top=1000&$skip=0

Page 2 (next 1000) 

https://creatiourl/0/odata/contacts?$top=1000&$skip=1000

Page 3 (next 1000) 

https://creatiourl/0/odata/contacts?$top=1000&$skip=2000

etc

Ryan

Show all comments