Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Office 365 User lookup produces error (invalid User ID), but performs

(0) ShareShare
ReportReport
Posted on by

I have a strange problem.

 

'Office365-Benutzer'.UserProfileV2(LookUp(Sort(BVJ_Schülerzahlen; Created; Descending); Direktorat = vardirektorat; 'Meldende Person')).displayName

 

This gives me the name I'm looking for. But sometimes when I start the app, on my phone, it produces an error message in the first two lines about the user id being invalid.

Any ideas? I don't want to annoy the people who use the app.

 

Thanks! 

  • schwibach Profile Picture
    schwibach on at
    Re: Office 365 User lookup produces error (invalid User ID), but performs

    Thanks a lot!
    That worked. It's strange because defining the variable is the first thing I do on start.

     

    I can only imagine that if the response from Sharepoint is not instant, the program recognises that for a moment there is no value, gives back the error, which in turn is immediately fixed.

  • Verified answer
    Re: Office 365 User lookup produces error (invalid User ID), but performs

    Hi @schwibach ,

     

    Could you tell me:

    1. What/s the data type of ‘Direktorat’ column? Is it a ‘Single line of text’ column?
    2. What’s ‘vardirektorat’? Is it a variable defined in canvas?
    3. What’s 'Meldende Person' column? Is it a ‘Single line of text’ column? Does it store users’ email?

     

    If my assumptions are correct ,I think the problem is the variable ‘vardirektorat’.

    Sometimes, the variable has not been assigned. So it find an empty record and the formula reported an error.

     

    You could try the following formula:

     

    If(!IsBlank(vardirektorat),'Office365-Benutzer'.UserProfileV2(LookUp(Sort(BVJ_Schülerzahlen; Created; Descending); Direktorat = vardirektorat; 'Meldende Person')).displayName, "Please assign a value to the variable first")

     

     

    Best Regards,

    Wearsky

    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard