Hello,
Is there an way around to add this into the label text?
If(CountRows(MyGallery_1.AllItems)>0,
"Count items: " & CountRows(MyGallery_1.AllItems);UpdateContext({IsNotFound:false})
,
"Count items: " & CountRows(MyGallery_1.AllItems);UpdateContext({IsNotFound:true})
)
Because i get a error on the UpdateContext
Thank you.
Solved! Go to Solution.
Hi @TimmyBoy ,
You cannot set UpdateContext in the Text of a Label - it needs to be a separate action - either that or do this on a button/icon
With(
{wRows: CountRows(MyGallery_1.AllItems)},
UpdateContext(
{
varRows: "Count items: " & Text(wRows),
IsNotFound: wRows = 0
}
)
)
then the Text of the Label would be
varRows
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.
MVP (Business Applications) Visit my blog Practical Power Apps
It looks like you are trying to update a variable in a text label? Is that correct? I don't think you can do that... what is it that you are trying to accomplish with your formula?
Hi @TimmyBoy ,
UpdateContext() is a behavior function and cannot be used in a label.
Best Regards,
Dezhi
Hi @Rusk ,
Well, i like to reset the IsNotFound value
To hide my other Group_HtmlText i have added above the Form1
Because when no data has been found this Group_HtmlText stays visible.
I even added this IsNotFound on visible of the Group_HtmlText
Hi @TimmyBoy ,
You cannot set UpdateContext in the Text of a Label - it needs to be a separate action - either that or do this on a button/icon
With(
{wRows: CountRows(MyGallery_1.AllItems)},
UpdateContext(
{
varRows: "Count items: " & Text(wRows),
IsNotFound: wRows = 0
}
)
)
then the Text of the Label would be
varRows
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.
MVP (Business Applications) Visit my blog Practical Power Apps
User | Count |
---|---|
257 | |
106 | |
87 | |
51 | |
43 |