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 / Named formulas issues ...
Power Apps
Unanswered

Named formulas issues : blank result lookup

(1) ShareShare
ReportReport
Posted on by 9

In App Forumals, when the lookup function returns no result, the variable does not become blank and main contains the last result that was not blank.

 

 

varAppCurrentORT = LookUp(ORTs, sqlID = varAppCurrentORTsqlID);
varAppCurrentPoS = LookUp(PoS, PoSID = varAppCurrentORTPoSID);
varAppCurrentCLLeft = LookUp(CLsDataSLO, SNNumber = varAppCurrentORTCLLeftSN);
varAppCurrentCLRight = LookUp(CLsDataSLO, SNNumber = varAppCurrentORTCLRightSN);
varAppCurrentCLLeftPrec = LookUp(CLsDataSLO, SNNumber = varAppCurrentORTCLLeftPrecSN);
varAppCurrentCLRightPrec = LookUp(CLsDataSLO, SNNumber = varAppCurrentORTCLRightPrecSN);
varAppCurrentPatient = LookUp(Patient, PatientID = varAppCurrentORTPatientID);

 

 

I've tried this formula, but the variable doesn't become blank and still contains the last non-blank result

 

varAppCurrentComments = If(varAppCurrentORTCommentsID>0, LookUp(ORT_Comments, sqlID = varAppCurrentORTCommentsID), Blank());

 

 

To test the behaviour I tried forcing the IDs to -1, which should return blank results, without success...

Do you know how to fix this bug? Should I stop using named formulas?

Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @DamienL ,

     

    Where do you put this code?

    If you want to update variable, I think you should use the Set or Update function and put the code on a behavioral property like OnSelect.

    Please try this:

    OnSelect of a button:
    Set(varAppCurrentComments,If(varAppCurrentORTCommentsID>0, LookUp(ORT_Comments, sqlID = varAppCurrentORTCommentsID), Blank()))

     

     

    Best regards,

    Rimmon

  • DamienL Profile Picture
    9 on at

    Hi @v-mengmli-msft 

     

    I put this code in Formulas from App because these variables are used from several screens in the application and are therefore always up to date, no matter how the id changes.

     

    Thanks for your help

    Damien

  • DamienL Profile Picture
    9 on at

    Hi @v-mengmli-msft ,

     

    Do you have any ideas about the source of the problem?


    I think this bug is recent because our application has been in production for a year and given the major consequences of this bug on our application, the problem would have been reported to me much earlier...

  • Hong Xian Zheng Profile Picture
    16 on at

    Hello, just want to share that we also experienced this problem and have reported it to Microsoft. This is definitely a bug...

     

    The problem started when publishing version changed from 3.23105.xx to 3.23113.xx 

     

    Blank lookups in Named Formulas were working fine before this. Last week we could still rollback the publishing version as a temporary fix. But now we are unable to do so as 3.23105 is no longer available.

  • DamienL Profile Picture
    9 on at

    Thank you for your reply @HongXianZheng I feel less alone!

     

    @v-mengmli-msft Is Microsoft planning to fix this bug quickly? The impact is considerable for us, as the application manages orders that send false information to production machines...

  • Hong Xian Zheng Profile Picture
    16 on at

    Hello @DamienL ,

    Just to update this issue has been resolved for me in publishing version 3.24 (This was released to my region somewhere in early-mid Jan this year)

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 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard