top of page
Search
  • Writer's pictureSenior Staff Writer

Using $select in Logic Apps for a Dynamics 365 query filter

While building an Logic App today, I needed to get all rows for a Dynamics 365 table, but the table has 100+ columns and I only wanted a few.


Unfortunately (at the time of this writing), the Logic Apps designer, using the Dataverse connector, does not allow you to select specific columns to return.


What you can do, though, is switch to the "Code view" and manually add the OData $select statement.


Here's an example where I provided the $select statement to the action's code that the designer created:


"D365_-_Retrieve_Users": {
    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['commondataservice']['connectionId']"
            }
        },
        "method": "get",
        "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('https://contoso.crm.dynamics.com'))}/tables/@{encodeURIComponent(encodeURIComponent('systemusers'))}/items",
        "queries": {
            "$filter": "modifiedon gt @{variables('MinimumModifiedOn')}",
            "$select": "systemuserid,domainname,modifiedon"
        }
    },
    "runAfter": {
        "Set_MinimumModifiedOn": [
            "Succeeded"
        ]
    },
    "type": "ApiConnection"
}


.

29 views0 comments

Recent Posts

See All

Comentarios


Post: Blog2_Post
bottom of page