Hi, everyone,
I would like to create a flow which retrieves the last 3 entries from a SharePoint list and adds them up.
The reason for this is that every line in the SharePoint list is a daily report. At the end of the day there are three reports, each of which contains numbers (number columns as well as calculated columns).
I would like to combine these numbers and then output them in a table by email.
I have already managed to do this for a report. However, I have no idea how I can / should call up three reports so that they are added together in the flow.
The flow should be triggered by a button in the Power Apps.
Is anyone able to help me?
regards
Livearus
Solved! Go to Solution.
I think you should be using Power BI to generate the report layout. Power Automate Flow is not a best tool to design reporting output. You can definitely achieve it with some complex logic but you need to maintain it later.
Can you define how you decide what are last 3 entries? If you mean last 3 created entries, then you can order your GetItems action in desc order and in Top count mention 3. This will retrieve 3 recently created entries for you.
Since you would like to invoke it from Power Apps, you can use Power Apps trigger. Refer how to Video from @RezaDorrani
https://www.youtube.com/watch?v=emAhLzVG9bM&t=223s
Okay, thank you for the answer.
But how do I add up these entries? I just can't imagine how the flow will build up?
In fact, it makes even more sense at the moment if I can call up the respective data records from the last 3 entries individually, then output them in a table and add them up in the flow itself.
Because I still need the entries individually, i.e. there should be 3 columns in a table, in each of which the entries can be seen.
How do I have to build up the flow to make this happen?
I have already created the table with HTML / CSS in the E-Mail V2 Action. Here I would then insert the calls via expressions / dynamic content.
Here is how I set up the flow (very simply) for a report (namely the last one created / - or changed). It will probably not be that easy for the last three reports, but I have no approach at the moment. Maybe someone can also recommend a suitable video or something?
The one linked above is not specifically about the issue intended here, apart from the trigger.
regards
Livearus
Ok. Please refer below...
I've already thought of something like that. In the case of the individual reports, not the summary, I had also tried the step via the "Select" or "Create HTML Table" action. I came across the problem that, for example, percentage values are not transferred correctly, or the date / time format is incorrect. It should be in UTC + 1 (Berlin ...), but for me it always hangs 2 hours behind.
I was able to fix this with the "AddTime" function, but this cannot be used in the "Select-Action" for the appropriate dynamic content. Here I can only access "body" and "value" in connection with expressions.
Another problem is that I needed a certain table format that cannot be easily solved with the "Create Table Action". I would have to use this "action" several times, in the end I decided to implement HTML / CSS completely in the "E-Mail V2 action".
But that is exactly what cannot be implemented with the last three entries. Especially since the entries should not simply be displayed one below the other. Somehow complicated, is there another solution instead of yours suggested, or can I manipulate here even more for my purposes?
By the way, how do I sort the retrieval according to the last three entries created? What do I have to write in "ODATA"?
regards
Livearus
Many questions. 🙂 I will try to respond to some of them.
vendor desc
@PrasadAthalye wrote:Many questions. 🙂 I will try to respond to some of them.
- For Sorting, just mention column name and sort order. E.g.
vendor desc
- If you are not able to find a column in select you can write the expression like ... item()?['Title']
- Can you explain what table format you are trying to put together? Create HTML table also allows Custom columns... If this does not help, you will have to declare a string variable and then loop through GetItems collection to generate table using HTML tags inside the loop using Append to string variable.
As is the case with beginners. Thank you for your patience.
PS: Another problem, you will soon be able to open your own forum here (just kidding aside from me). The CSS does not seem to work in the Outlook Desktop Client. Although CSS is activated there, formatting on classes, for example, is not displayed. However, there is also a problem with the "Create HTML Tabel Action". How am I supposed to assign classes here? I can only access the standard HTML tags (table, td, th etc.). It is funny that it is always displayed correctly on the web, also in my "home office" with desktop client, but not at work with Outlook desktop client.
regards
Livearus
I think you should be using Power BI to generate the report layout. Power Automate Flow is not a best tool to design reporting output. You can definitely achieve it with some complex logic but you need to maintain it later.
That may be good, I think there are always tools that are more suitable. For me and the organization in which I work, the use of Power Automates or even SharePoint is a quantum leap (^^).
Apart from that, I don't have access to Power BI with my Office 365 subscription, apart from the trial version.
So I would stay with Power Automate for now.
I would be very happy if you could somehow help me with the above problems, but you can also understand if the effort is too great.
regards
User | Count |
---|---|
88 | |
40 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
50 | |
47 | |
35 | |
25 |