We have an SP List called eBayIT_TrackMySales and in our flow we need to get a count of items in the list that match the trigger record on two columns called T-Code and BoxNo
I guess I need to do a GetItems step and filter but I don't know where to go from there?
How can I do that please?
Solved! Go to Solution.
in the end I resolved this by using quotes correctly in the filter:
BoxNo eq '@{triggerBody()['BoxNo']}' and T_x002d_Code eq '@{triggerBody()['T_x002d_Code']}'
and to get the count I used
length(body('Get_Items')['Value'])
it now works fine...
HI @livingstonep,
You can use the filter option in the Get items . For more details pleasee see my post on filtering on the get items action.
Once you get an array of items back. you can use the length function to count the items.
Pieter @Pieter_Veenstra,
So your example stated for dates "Created gt ‘2018-11-28'". If I have colum called "Current Contact Date" and want to filter by only items in the last seven days including the current date I would need the "Current Contact Date lt addDays(utcnow(),-7,'Current_x0020_Contact-x0020_Date') I have a live example I need to get working by this time next week so I can send something out with data from today through to the 15/01/2019.
Regards,
Andrew
Hi @livingstonep,
What is the type of T-Code and BoxNo column in your sharepoint list?
Bet regards,
Alice
in the Get-Items step we're trying to filter on two columns, BoxNo (integer) and T-Code (string)
so the GetItems step will find all records from the list where the T-Code and BoxNo in the list match the T-Code and BoxNo of the current record that triggered the flow...
here is what we've tried:
(T-Code column has internal name T_x002d_Code)
then we need to run an Apply to each for all records matched,, and set a field called LabelSent to "Yes"
but when we test the flow we get an error:
The expression \"BoxNo eq 5 && T_x002d_Code eq A02\" is not valid.\r\nclientRequestId: 4b983a8c-7ba5-4a5f-8702-7ed96c564723\r\nserviceRequestId: f697b49e-c0e0-7000-7d75-d83eaa4973de"
in the end I resolved this by using quotes correctly in the filter:
BoxNo eq '@{triggerBody()['BoxNo']}' and T_x002d_Code eq '@{triggerBody()['T_x002d_Code']}'
and to get the count I used
length(body('Get_Items')['Value'])
it now works fine...
hi can you explain where did you put this?
and to get the count I used
length(body('Get_Items')['Value'])
thank you
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
40 | |
37 | |
32 | |
31 |
User | Count |
---|---|
52 | |
40 | |
35 | |
33 | |
24 |