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'
Solved! Go to Solution.
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.
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.
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.
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.
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.
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.
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?
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.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |