I suspect you're getting this error because you're passing the data table name to the CountRows function like so:
The trick is to provide the data source to the CountRows function, rather than the table name. You can find this by viewing the properties of your data table, and going to the Data section.
Yes, the value that you need to pass to the countrows function is the datasource, not the datatable.
In my example here, the value I would pass to the countrows function is highlighted.
So in your case, it would be:
"if (countrows(datasource) > 0, navigate(blah), false)"
one more question, i put filter on the datatable
how will i use this?
Try this -
If (Countrows( Filter(ProjectHistory,Title= DataCardValue9.Text) ) > 0, navigate(blah), false)
so basically it will count the rows for the filtered datasource .
I see that you are just checking if the table is empty of not, so you could also use the IsEmpty function.
Hope this helps!
Check out the News & Announcements to learn more.
Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.