cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
victor_lion
Helper II
Helper II

Problem with condition and SharePoint

Hello people! I'm using a flow for change name in some archives, and I do OCR on the archive and get the infos I want to use, but they should be placed in different folders, so I'm using a condition... The problem is that for some text I get from the OCR it works fine, but for the others, it returns InvalidTemplate contains expect to receive a string... Here is some screenshot from my flow, it is in portuguese, but I think it won't be a problem... 

victor_lion_0-1603894772371.png

I receive the OCR from HTTP, but also tried to use substring function, compose, and others, with no success

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @victor_lion,

 

It seems that the error is caused by the different data types input in the two sides of Condition action.

If a string on one side of Condition action, an integer on the other side, the condition couldn't work. You should use int() function or string() function to convert one side, for example:

Screenshot 2020-10-29 103817.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @victor_lion,

 

It seems that the error is caused by the different data types input in the two sides of Condition action.

If a string on one side of Condition action, an integer on the other side, the condition couldn't work. You should use int() function or string() function to convert one side, for example:

Screenshot 2020-10-29 103817.jpg

 

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

Hi @v-litu-msft

 

I'm using string(), and also have used substring, to select just one line of the document:

victor_lion_0-1603969659488.png

This nested flow receives information from this flow:

victor_lion_1-1603969771135.png

But it appears to be random, as some of the files it goes well, and for some of them occurs the related error.

@v-litu-msft, just used string() on both flows, and it came out ok, will do some more tests, and I hope this is it, thanks for the help!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,818)