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 Apps
Unanswered

Bypass a lookup

(0) ShareShare
ReportReport
Posted on by 24

In my app (source is dataverse), I retrieve a record number as a result on my browse gallery.

 

See this formula:
ForAll(Distinct('AM Expense Records', 'Record Number'.'Record Number'),{Result: ThisRecord.Value})

 

Later on, in my edit screen, I like to add more rows to the same record number. Right now, I have this formula

'Record Number': LookUp('AM Expense Record Numbers','Record Number' = galBrowse.Selected.Result)

 

Please, how can I assign the result (that I got earlier) to the record number in this step above without having to do a Lookup again? My app is very slow right now and I am trying to optimize it. Thank you!

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @emea234 ,

     

    Please try:

     

    ForAll(
    Distinct('AM Expense Records', 'Record Number'.'Record Number'),
    {
    Result: ThisRecord.Value,
    'Record Number': LookUp('AM Expense Record Numbers','Record Number' = ThisRecord.Value)
    }
    )

     

    Best Regards,

    Bof

  • emea234 Profile Picture
    24 on at

    I am trying to minimize the use of lookups in my app. I went ahead and created a collection to store the record number. When I call it with a patch function, I get this error: This type of argument does not match the expected type 'record'. Found type 'table'.

    ClearCollect(
    UpdatesToApply,
    IfError(
    { 'Record Number': LookUp('AM Expense Record Numbers', 'Record Number' = galBrowse.Selected.Result) },
    Blank()
    )
    );
    Patch(
    'AM Expense Records',
    Defaults('AM Expense Records'),
    {'Record Number': UpdatesToApply[0].'Record Number'}
    );

     

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard