web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Slice expression...
Power Automate
Suggested Answer

Using Slice expression giving errors for a Look up column field in SharePoint

(0) ShareShare
ReportReport
Posted on by
I am using this formula expression (slice(items('Apply_to_each')?['name'], 0, 6)) to set a look up column in SharePoint. However it gives me below error which I understand as look up column may need Integer data type. Can someone pls help me to resolve this error
 
The 'inputs.parameters' of workflow operation 'Update_file_properties' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Site/Id' is required to be of type 'Integer/int64'. The runtime value '"HAMPPA"' to be converted doesn't have the expected format 'Integer/int64'.
 
 
error.png
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi,
     
    From the error - i could see that output of slice expression is a string "HAMPPA" rather than a integer value. Could you please check the value items('Apply_to_each')?['name'] - like what value you need to extract from it ?
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • David_MA Profile Picture
    15,101 Super User 2026 Season 1 on at
    You will need to show the configuration of the action Update file properties in your workflow, which is where the error is occurring according to the error message. Based on the error, it doesn't seem related to your expression. 
     
    However, the issue might be as simple as using this expression, so it returns an integer instead of a string once you resolve the issue identified by @Nived_Nambiar that you are returning text with your expression ("HAMPPA"): int(slice(items('Apply_to_each')?['name'], 0, 6))
     
    Without seeing your flow, I don't know where you have used the expression.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 246 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 176

#3
Haque Profile Picture

Haque 157

Last 30 days Overall leaderboard