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 Apps / Issue when querying Da...
Power Apps
Answered

Issue when querying Dataverse Users table in play mode

(1) ShareShare
ReportReport
Posted on by 8

Hello,

 

The following statement pulls properly the primary email value of the user who created a dataverse table record. However it only works when my app is in Edit mode. In Play mode the value is empty:

 

ClearCollect(CoInfoCreatedBys,First(Filter(Users,User=_selectRequest.'Created By'.User)).'Primary Email');

Notify(First(CoInfoCreatedBys).Value);
 
Notes: 
 
1) _selectRequest contains the record I loaded from a DataVerse table.
2) The rows count of the collection always return 1 (in both play and edit mode)
3) If I display the User GUID instead of the Primary Email, this works in both modes, so the query finds the user matching the GUID:
ClearCollect(CoInfoCreatedBys,First(Filter(Users,User=_selectRequest.'Created By'.User)).User);
 
 
Could anyone confirm to have the same issue that the above works in Edit mode but not in Play mode ?
And any idea why this does not work in play mode, is this a PowerApp bug ?
 
Thanks in advance for sharing !
 
Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @GreenDev , You can also use Lookup. Try this:

    ClearCollect(CoInfoCreatedBys,LookUp(Users,User = _selectRequest.'Created By'.User).'Primary Email');
    
    Notify(CoInfoCreatedBys.Value,NotificationType.Information);

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • GreenDev Profile Picture
    8 on at

    Thanks ANB, I tried it however I have exactly the same issue: it works in Edit mode, but in Play mode it's like the Primary Email value can't be accessed. Value stays blank. Could you please  confirm it works for you in Play mode ? 

  • Verified answer
    ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    @GreenDev Where you have this code? I mean on some button OnSelect property or somewhere else? Did you tried on Onvisible property of screen?

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • GreenDev Profile Picture
    8 on at

    Many thanks ANB !

    The code is plugged at On Success of a form submission.

    I tried it as you suggested within the On Visible of a screen and it worked  (in both Edit and Play mode).

    Then to solve the issue to have the code working within the On Success event, I simply had to reload the saved record in a collection. I'm still wondering why this difference between Edit and Play mode, but you made my day, thanks very much again !!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 604

#3
11manish Profile Picture

11manish 518

Last 30 days Overall leaderboard