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 / Error getting first le...
Power Automate
Unanswered

Error getting first letter of surname in lookup field

(0) ShareShare
ReportReport
Posted on by 12

I have a list in sharepoint that I'm populating via power automate.
I had a bit of trouble getting all the data, now I'm not managing to get a lookup type value.

1.png

This value is one of the letters of the alphabet, which however I would like to obtain dynamically from each user by taking the first letter of the surname in uppercase.

2.png

To obtain this data I thought of using as custom value this function:

 

toUpper(substring(items('Apply_to_each')?['surname'], 0, 1))

 

 

3.png

and in fact it works, because I get the letters correctly, but evidently the data type is not suitable, because it makes errors:

 

OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/AZLookUp/Id' is required to be of type 'Integer/int64'. The runtime value '"P"' to be converted doesn't have the expected format 'Integer/int64'.
 

4.png

What am I doing wrong? How can I solve it?

Categories:
  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Since this is a lookup you need to insert the ID of the according item from the "Alphabet" list.

    So you have to determine this ID first.

     

  • lcristo-avvale Profile Picture
    12 on at

    The "Alphabet" list does not have an id column.

    5.png
    Should I add it? But then how do I get that ID?

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Every list item has an ID. It's just hidden.

    For example, you can perform a Power Automate “Get Items” and inspect the resulting JSON.

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard