I am using Cast function in PowerAutomate.
I was trying to read data from an D365 Human Resource entity though Odata endpoint and used Cast function as the field was of Yes/No (Enum) type.
The cast function was working absolutely fine a week ago but now it doesn't return any data all tough I have manually verified that the data exists.
@abmYes it is an option set, stored as integers on back-end and displayed as string on front-end.
And Yes I have tried passing it as integer and string as well but it doesn't work.
Here's a screenshot of passing it as integer.
The "PersonnelNumber" is a text field.
Its not working without the single quotes around it.
Plus, the issue is with the cast function and "IsPrimaryPosition" column not with "PersonnelNumber" column.
Try to do the following:
Remove the second condition. Run the flow. Check the run history values and see what values are returned for two options set field. If you could post a screenshot that will be helpful.
I did tested this. I have created two fields similar like yours one string and another Yes/No optionset.
Following WEB API I tried
https://xxxxxx.crm11.dynamics.com/api/data/v9.0/ajb_sports?$filter=ajb_personnelnumber eq '100' and ajb_isprimaryposition eq true
My results are as follows:
So in your case you don't need any cast to convert Yes/No. Also make sure there are no quotes around true.
Thanks for the discussion. So found out that this post ODATA is in question related to Dynamics Human Resource not Dynamics CE. Unfortunately I don't have the knowledge to provide any help on this. Hopefully Microsoft support could answer this.
Check out new user group experience and if you are a leader please create your group
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.