web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint List form N...
Power Apps
Unanswered

SharePoint List form Not Including 0 Values

(0) ShareShare
ReportReport
Posted on by 152

The form that I developed is not recognizing a 0 in the SharePoint list for some reason.  If the value is greater than 0 it works perfect, the problem is  I get ?? BLANK ?? when it is 0.  Tried an IF statement but that is plagued with errors.  Is there some advice or help with why i dont get the list value of 0?

 

What I have now

"Previous Month Value (Kg) - " &
LookUp(
Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), // Sor t to get mos trecent on top
'Reporting Site'.Value = DataCardValue2.Selected.Value, // Pick the first entry in sorted list that matches Reported Site
'Hazardous - OffSite ReUse') // use the offsite resuse value found in the entry above

 

What I tried to do to insert a 0 but it errors out
"Previous Month Value (Kg) - " &
LookUp(
Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), // Sor t to get mos trecent on top
'Reporting Site'.Value = DataCardValue2.Selected.Value, // Pick the first entry in sorted list that matches Reported Site
(IF(
ISBLANK('Hazardous - OffSite ReUse'),0,'Hazardous - OffSite ReUse'

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @ghutchinsMicron 

    There is no reason that a 0 would return as blank!!  There seems to be the start of the mystery.

     

    Although the below formula would work around it...it is not correct that you would get a blank.  So I would really investigate that first!  My guess is that your Lookup is NOT returning a value at all.

     

    The workaround (again, not really suggested) would be:

    "Previous Month Value (Kg) - " &
    Coalesce(
     LookUp(
     Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), 
     'Reporting Site'.Value = DataCardValue2.Selected.Value, 
     'Hazardous - OffSite ReUse'
     ),
     "0"
    )
    

     

    I hope this is helpful for you.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @ghutchinsMicron ,

     

    Try using the Coalesce function:

     

    "Previous Month Value (Kg) - " &
    Coalesce(
    	LookUp(
    		Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), // Sor t to get mos trecent on top
    		'Reporting Site'.Value = DataCardValue2.Selected.Value, // Pick the first entry in sorted list that matches Reported Site
    		'Hazardous - OffSite ReUse'), 
    		0
    )

     

    This function goes through it's arguments and returns the first non-blank value. 

  • ghutchinsMicron Profile Picture
    152 on at

    Sincere thanks to you @RandyHayes  and @BCBuizer...  This solution did work around my problem.  Curious as to why I have the problem. Perhaps as i learn more i will look back on my efforts here and shake my head.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @ghutchinsMicron 

    You should not be getting a blank for a zero...that would lead to a LOT of issues!!!

     

    To Test - I would put a label on your screen and set the Text property of:

    LookUp(
     Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), 
     'Reporting Site'.Value = "c", 
     'Hazardous - OffSite ReUse'
    ) 

    And see what that returns.  According to what is seen in your picture, it should show "0"

    If not, then something else is going on.

  • ghutchinsMicron Profile Picture
    152 on at

    Something else is going on...  i got nothing back.  In the earlier stages of development I think it was working as expected.  In SharePoint the list was initially set up to have default column values of 0 then I was directed to remove the default of 0 which would require them to provide a response.  Not sure but now I think my issue is before Power App...  something to do with the SharePoint list perhaps.  I think what I will do to test that is delete the SharePoint list and rebuild app with the new list.  If nothing else it will give me some badly needed practice.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @ghutchinsMicron 

    Yes, that sounds like the issue is "list-side".  Have you looked through the list to see if there is a record for that Reporting Site that has a blank?

  • ghutchinsMicron Profile Picture
    152 on at

    After looking at a lot of things I find that I may have the syntax wrong????  I looked closer at the function in the 'Text' property of the label and found that @RandyHayes  script is indeed fetching the value from the SharePoint list.  When I doctor it up with a bit of text to indicate what the value is the value disappears....  

     

    This function does show the value from the SharePoint list.

    LookUp(
     Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), 
     'Reporting Site'.Value = "c", 
     'Hazardous - OffSite ReUse'
    ) 

     This function does NOT show the value from the SharePoint list, adding the script in orange kills the output.

    "Previous Month Value (Kg)- " & LookUp(
     Sort('Waste Disposal Data', 'First Day in Reporting Period', Descending), 
     'Reporting Site'.Value = "c", 
     'Hazardous - OffSite ReUse'
    ) 

     

    As far as I can tell i got it right by using "Previous Month Value (Kg) - " &  yet something is still wrong.  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard