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

Notifications

Announcements

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'.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 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
    12,982 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard