cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbrines
Post Prodigy
Post Prodigy

Help with Flow to Power Apps

Hi All,

 

I am following the below link but it fails at the end of the flow with the following error. I see a few people have tried contacting the author but no reply. The only part I have changed is instead of having "Comments" I have "AdditionalComments"

 

Display Appended Comments Version History From SharePoint List On PowerApps (c-sharpcorner.com)

 

Comments1.JPG

 

Below is the flow I have created.

 

Comments2.JPGComments3.JPGComments4.JPGComments5.JPG

 

33 REPLIES 33
Pstork1
Dual Super User III
Dual Super User III

Move the Compose action with the FormatDateTime function inside the For Each loop.  That should clear up the error.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
jbrines
Post Prodigy
Post Prodigy

@Pstork1 That worked but now following on with that article I am creating the button and when I enter the set function it fails, any ideas on how to resolve?

 

Comments6.JPG

Pstork1
Dual Super User III
Dual Super User III

So is "AdditionalComments" an actual property returned by the REST call?  Or did you change the name in the schema? If it is an actual property are you sure its a string and not an array of strings?  Can you post the JSON you get when you run the HTTP call?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 Can you help me fill in the values do I can test the flow?

 

I know the Column Name, Site address and List Item ID but I don't know where to get the three others, I am assuming the List Name value can be gotten from the SharePoint list. The other two Initializevariable_Value I haven't a clue where they are in my Flow.

 

Thanks John.

 

Comments7.JPG

Pstork1
Dual Super User III
Dual Super User III

The list name will be the name of the list from the URL that you use to display the list in a web page.  But I have no idea where you are using the other two variables.  If you look at the blog those values aren't mentioned.  Without seeing your actual flow I have no way to know what those are supposed to contain.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 The flow is on the original post above. Aaprt from the Step to Respond to PowerApps

Pstork1
Dual Super User III
Dual Super User III

I understand that.  But the original post has 5 parameters and you have 6.  I have no idea how those parameters match the ones in the post or what you are using the extra one for.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @Pstork1 

 

I have 5 variables and he(Blog) has 5 variables. The only difference is in his finial diagram he has 2 Parse JSON but if you go through it he only describes one Parse JSON.

 

Comments8.JPG

Pstork1
Dual Super User III
Dual Super User III

The screenshot you supplied has 6 textboxes on it.  So there are 6 requests for information.  you may only be using 5, but again I have no idea which 5 you are actually using.  In terms of the Parse JSON actions I don't know why his screenshot shows two.  I only see the need for one in what he is doing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 to help me figure out what extra request for information is there can you mark the 5 on his I have put below as an image?

 

Comments11.JPG

Pstork1
Dual Super User III
Dual Super User III

Actually, going through the blog post I only see four requests for information from Power Apps.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 

 

The only things I have changed are as follows.

 

I changed the SharePoint name to the one where my list in the Send an HTTP Request to SharePoint

 

Then I changed "Comment" to "AdditionalComments" which is the name of the list column I Want to work with

 

Parse JSON

 

{
    "type": "object",
    "properties": {
        "value": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "AdditionalComments": {
                        "type": "string"
                    }
                },
                "required": [
                    "AdditionalComments"
                ]
            }
        }
    }
}

 

I then went on to add the button to my PowerApp

 

Where I change the following to suit my site

 

Set(AppendCommentsMore,GetAllversions.Run("Comment","https://xyz8.sharepoint.com/sites/PowerApps","AppendedTextSample",SPAppendText.Selected.ID))

 

I change "Comment" to "AdditionalComments"

I change the site to mine, I then change 

I change "AppendedTextSample" to "Client Issue" the name of my list

 

And obviously after your help I put the Compose and Append to String variable

 

I really appreciate the help you are giving me.

 

John.

Pstork1
Dual Super User III
Dual Super User III

Unfortunately, the fact that its asking for 6 items means you had to have changed more than that.  The six prompts means that you've used the AskinPowerApps dynamic content 6 times.  Without seeing your code there is no way for me to know where those extra prompts are.  So there really isn't anything else I can do to help you.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 I can only see that I am asking powerapps 4 times just like the blog, would be helpful if you could show me where I am asking 6 times.

 

Also looks like I am not the only person who is getting the same error.

 

Comments12.JPG

Pstork1
Dual Super User III
Dual Super User III

You posted the following screenshot which clearly shows 6 prompts for information.  That's why I say 6. I can only go by what you've posted.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Agreed that is what is show but not sure where that has come from.

Pstork1
Dual Super User III
Dual Super User III

I just worked through the Blog post using a Multiline field called 'AdditionalComments' and it works for me.  The one change I had to make was to his JSON schema to allow for versions with no value added to the Additional Comments field.  For that I just had to change the schema from 

"type": "string"

to 

"type": ["string", "null"]

One other hint is to not just copy and paste his code.  Some of it has to be entered through the Expressions tab or it won't work.  But the process does work as written.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 I am getting there with this and thanks again for the help.

 

I am stuck with the final part, 

 

Set(AppendCommentsMore,GetAllversions.Run"Comment","https://xyz8.sharepoint.com/sites/PowerApps","AppendedTextSample",SPAppendText.Selected.ID))

I am trying to figure out what "SPAppendText" is in the above. I have worked out the rest but can't get that

 

Thanks

 

John. 

Pstork1
Dual Super User III
Dual Super User III

Two things.

1) You are missing an open parentheses after '.run'  it should look like this.

Set(AppendCommentsMore,GetAllversions.Run("Comment","https://xyz8.sharepoint.com/sites/PowerApps","AppendedTextSample",SPAppendText.Selected.ID))

2) SPAppendText.Selected.ID is the ID number for the List Item in SharePoint where you want to see all the version comments.  In my case I used a Gallery to display the list items.  So that entry becomes Gallery1.Selected.ID.  I'm not sure what it would be for you in your Power App.

 

Also, in your example isn't the field you want called AdditionalComments?  rather than just Comment?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Users online (3,405)