I am new to power automate but I am trying to use the salesforce connector to pull multiple pieces of data from projects my team is working on each time they make an update in salesforce. I have a filter query in the trigger condition that occurs when a record is modified that filters to only occur when the local sales manager is who I choose.
( EX: Local_Sales_Manager__c eq 'John Smith').
I need to pull data from more than one object in salesforce so I am using the Get Records action to do this for the two other object places I need. Using these makes a for each loop when the dynamic content is added into the excel sheet.
When I attempt to run the filter becomes ignored when the for each loop/ Get Records is being used. The filter works as intended when no additional filters are called using Get Records. Am I misunderstanding the Get Records or is there a way to make the filter still apply or appl a filter to the Get Records also.
Thank you!
Thank you! Just to expand for others looking, I found objects that pulled the same data for Opportunity and for Oracle Quotes. These have different names but can be used as a way to make sure the filter query only filters for the same project.
Ok, I have never used the Salesforce connector. But I do think we can take steps to get your Filter Query working. I would do that by checking the outputs of the data and checking the column names.
So currently this is your flow:
I would add a compose step to the flow after the initial trigger, and put the dynamic content from the trigger (Opportunities) into the compose step.
So you should have:
Then run the flow.
When you look at the results of the flow you are looking for 2 things.
First: Look at the result of the Compose. This will show you what the output of that Opportunities looks like. So you will know if it is a string, number, and whatever is being pulled for that data.
Second: Look at the outputs of the two Get Records. You want to see the specific column names as well as the data that is returned. The specific column name should show you how to type the name in the Filter Query of the Get Records.
So if the output of Get Records: Opportunities shows the column as "cafsl_Opportunity_c": "OP1234" then you can copy and paste the column name cafsl_Opportunity_c and then put that into the Filter Query of Get Records: Opportunities. You also know that the data itself is a string.
However, if the output shows "cafsl_Opportunity_c": 1234 then you know the type of data is an integer and you would not use the single quotes ' around your dynamic content in the Filter Query.
Do you think you can try that or something along those lines? We are basically trying to get the Filter Query for the Get Records: Opportunities to work correctly. And to do that we have to run tests to see what the data is supposed to look like.
I have come to realize that each get records needs its own filter query. This is the filter I was talking about that works when I am not pulling any information besides from the oracle quote object
My goal is to pull the information from opportunity and oracle quote line items for ONLY the particular oracle quote that is being updated. Because currently I think the get records is pulling from all records causing it to either not work or place projects in my excel sheet not from my team. I have been adjusting my actions steps so dont really have anything thats sticking. Here is an example of one of them:
edit: I have changed filter query to cafsl__Opportunity__c and still not working.
I think I can create a dynamic filter using data pulled from "When a oracle quote is modified" in later Get records/ record actions but can not figure out how. I appreciate the response.
Can you show a screenshot of your Salesforce actions? I'm trying to see what you used in the individual steps.
Can you explain more about "When I attempt to run the filter becomes ignored when the for each loop/ Get Records is being used."
Are you are saying that a Filter (what filter?) is being ignored when an Apply to Each step is added to the flow?
Can you explain more about "The filter works as intended when no additional filters are called using Get Records."
I don't understand what filter works as intended when no other filters are called?
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional