cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonL_srft
Frequent Visitor

Get Rows V2 SQL to Update SharePoint List Problem

Hi all

 

I am pretty new to Power Automate and learning quickly due to the great resources and posts on here.

 

One issue I am having but I think a pretty simple one is this.

 

I have a flow that first gets rows from a SQL view.  All the fields in the source SQL view as string values including a field called Title

 

From the Get Rows, I then am trying to update rows in a SharePoint list where Title from GetRows equals Title in SharePoint list.

 

I have done this by using SharePoint Get Items first in an Apply To Each where the SharePoint Title eq Title from the output of the GetRows (before I then do an Update List items).

 

Since the Title field holds values as examples 20089882, 20663644, 29882726-2 it is assuming that these are integers and when it comes to processing one with the -2 in, it complains that it is not an int.

 

How do I get the output from SQL to make sure it converts the Title into a string in the output.  I know the output from the GetRows is dynamic but I want to ensure the output variable is string values.

 

Can anyone describe how to do this?

2 REPLIES 2
Rahber
Solution Sage
Solution Sage

you can intialize a variable of type string and whatever value you give in it will convert it to a string. Please make sure to itnalize the variable outside the apply to each loop and use set variable in loop.

 

or you can use this function 

string(SQL Title Value) when comparing 
 
Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,
Rahber

 

 

JonL_srft
Frequent Visitor

Thank you replying. 

I will give your solutions a try.  It makes sense to me now.

 

Much appreciated.

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (2,088)