Hi everyone!
I just started learning how to use Power Automate and I got stuck when trying to build a flow which would take data from SAP and add them to a Sharepoint table. Could you please help me with this?
Running this flow populates the Sharepoint list but only with empty values. I guess I am not properly referencing the value in the variable but I can't get to the answer myself.
Thanks in advance!
Hi @shibathedog ,
Can you add a Compose action inside your loop and pass Current Item. See what is returned in the run history and that the column has values.
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi @eric-cheng , thank you for the help but unfortunately it still gives me the empty values 😕
I inserted the Compose action between Set Variable and Create item, all inside the loop.
Should I try something else?
Hi @shibathedog ,
The BAPI must be returning rows as you can loop. Is it null for all your columns or just the column you are referencing? Have you checked the function inputs?
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
@eric-cheng it's blank for every column I tried to reference. The output of the function is a json table that has all the values. I can also get a csv/html table out of it (with Create __ table) and the values are there. I just can't get it to write into a Sharepoint list.
Hi @shibathedog ,
Just to clarify your last post.
1. There are values returned from the function?
2. You can output it to HTML table ?
3. It is only null when you create items in SharePoint?
In the screenshot of your opening post, what is the output of your TitleName variable after Set Variable?
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi @eric-cheng , yes, I confirm that the function has an output, just not to the sharepoint list. If I would do: Manually trigger flow > Call SAP Function > Create HTML table, I would get a html table (with its respective delimiters).
The output (in field: Value) of the TitleName is a column name from SAP. I tried different column names but without luck.
Hi @shibathedog ,
So when you set the variable, is there a value or not?
With the info provided and without being able to have a more detailed look at outputs and run history, its difficult to be able to provide any meaningful help. Obviously I understand the need for security.
I suggest for you to investigate the input/output of each action further as its obviously returning data according to yourself.
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi @eric-cheng ,
Thank you a lot for the help, I understand that with this limited information there's not much you can do about!
I am not able to see the output of the Set Variable as it's in the loop:
I canceled it as it was filling the list with empty values.
And when I expand on Call SAP function I get the json table which contains the values I need:
It doesn't seem that I can make a Set Variable step out of the loop.
Does this help?
Thanks a lot, once again! 🙂