cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Condition comparing SQL column to SharePoint List ID column

I have a condition that compares an nvarchar SQL column to a SharePoint list ID column, but the condition keeps evaluating to false even when both columns contain the same value - is this sort of comparison possible, first of all, and if so what is keeping it from evaluating to true?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Condition comparing SQL column to SharePoint List ID column

Hi @Anonymous,

 

If the Dynamic content type is not the same, the condition would be always in false.

To compare the value, please consider take use of the conversion function.

Click the Advanced option of the condition, then add the Int() function for those two fields.

Something like:

@equals(
               int( SQL Content ),
               int ( SharePoint Content )
       )

Doing it in this way should make it work.

If you have any further questions, please post back.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Condition comparing SQL column to SharePoint List ID column

did you store them in string variables before the comparison ? (just curious)

 

Anonymous
Not applicable

Re: Condition comparing SQL column to SharePoint List ID column

No, I haven't done anything to them. I'm simply selecting what appears in the dynamic content popup.

Community Support Team
Community Support Team

Re: Condition comparing SQL column to SharePoint List ID column

Hi @Anonymous,

 

If the Dynamic content type is not the same, the condition would be always in false.

To compare the value, please consider take use of the conversion function.

Click the Advanced option of the condition, then add the Int() function for those two fields.

Something like:

@equals(
               int( SQL Content ),
               int ( SharePoint Content )
       )

Doing it in this way should make it work.

If you have any further questions, please post back.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

afernando
Level 10

Re: Condition comparing SQL column to SharePoint List ID column

Hi,
I'm also trying to achieve something similar but not having much luck.

I'm also trying to achieve something similar but not having much luck. I have 2 identical SQL tables and a flow that copies all records that are older than 7 days from Table 1 to Table 2 and then delete from Table 1. 

But the flow fails to run frequently while trying to copy duplicate records from Table 1 to Table 2. (Table 2 doesn't accept duplicate records for a certain column.)

So I'm planning to add a condition to check if a certain record exists in Table 2 before copying and skip those records if the condition is true.

Below is a screenshot from my flow. Much appreciated if someone can show some light to achieve this. Thanks!

flow.PNG

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 392 members 6,665 guests
Please welcome our newest community members: