Category: azure logic apps
BugPie on Thu, 24 Jan 2019 18:09:32
I'm working with the Logic App Salesforce connector, specifically the "When a Record is Modified" trigger on a Projects object in PSA. I'm syncing data to a SQL db instance but I do not need all the fields in the record only some. It would seem that anytime a record is updated, this trigger will fire, which I believe is causing me trouble.
I have been able to use the Select Query within the advanced options on the Trigger to only sync those specific fields to my SQL db. But that simply causes extra noise and i'm firing the trigger when its not needed.
Is the option for ODATA Filter what I need to be working with? If so is there anyone who can help point me towards some examples?
Example would be. I want to have my trigger fire only when the address fields are updated. Street, City, Zip, State. So if thestage of the project were to change, my trigger would not fire.
KetanChawda-MSFT on Tue, 29 Jan 2019 11:44:29
AFAIK, You can't restrict the input trigger to fired based on the fields condition but you can write a ODATA filter on select query so that it will get the mentioned fields instead of getting all the fields in select query.
BugPie on Tue, 29 Jan 2019 19:07:48
Thanks for your response. I have found how to use the SELECT QUERY to only retrieve specific fields from the entries. I think that it what you are referring to? I'm trying to use the other option for FILTER QUERY in hopes I can suppress these records to only ones I want to sync over.
If you look at the Filter Query UI it has help text saying "...to restrict the entries returned" so I was hoping this could be used to restrict my entries to only those with updated coordinate field, for example. Then I would use the Select Query to grab only the fields from that entry. Any insight on this?
KetanChawda-MSFT on Wed, 30 Jan 2019 04:55:04
Yes I tried with the Filter Query and what I observed is , The LA is triggered when the Filter Query condition is met it will ignore other triggers. So you can use Filter Query to restrict your LA trigger.
Query pattern I used stringColumn eq 'stringValue'
BugPie on Wed, 30 Jan 2019 19:31:08
Well that's great to hear! I will give this a try and see if I can keep the LA from firing when fields that are not needed to be synced, are updated.
Perhaps you can just help me close this out by shedding light on the format or pattern you are using for this Filter Query. I'm not sure I am understanding what you have written into the query syntax. For example if I wanted to use this Filter to only fire when these fields are updated, how would you format this?
Latitude, Longitude, Site Name, Site Address.