While working on one PowerApp, I observed that the code written in first screen “OnVisible” event is not executing which means OnVisible event is not firing. I found couple of workarounds for this issue.
Workaround 1: Add a welcome screen with a simple button which will navigate to your actual screen.
Workaround 2: If you don’t like the Idea of having a welcome screen, you can use this one. Place a timer control on the screen (make it invisible and sent to back) and write the code in “OnTimerEnd” event.
Recently I worked on one PowerApp which will call the MS Flow to perform my action. Initially, I created a Flow with 8 parameters and passing the values from PowerApp but at the end I realized that I can perform my action with 6 parameters in MS Flow, so decided to delete the extra 2 parameters as my PowerApp is expecting the value for those parameters which are not required. There is no direct approach to delete the parameters in Flow, I think Microsoft still working on this issue but there is workaround to do this
Delete the PowerApp trigger on the top of the MS Flow and you see a message box “This step and associated dynamic content will be deleted from this flow.”
Click on OK (It won’t affect the actions in your flow)
Add the PowerApp trigger again, this should give you a chance to provide a new dynamic content.
I know it’s not a best approach but as of now we don’t have any better way to resolve this issue. Hope it helps….
Today I faced an issue to get the records in PowerApps from SQL database by applying date filters (From and To Dates). I spent so much time to retrieve the records by using the below command “ClearCollect(FilteredWorkReports,Filter(‘[SQL_Table_Name]’, ReportDate >= FromDate.SelectedDate && ReportDate <= ToDate.SelectedDate))“, but I didn’t get the expected result. The reason is simple “Direct date filters do not work for SQL Server” based on this link from MS. So, the solution for this issue is to create a calculated column for the date column in SQL table with Integer datatype. The formula for this calculated column is “YEAR([your_date_field]) * 10000 + MONTH([your_date_field]) * 100 + DAY([your_date_field])“. The data in your table will look like below with new field
Finally, I applied the date filter with new column like below which is working like a charm 🙂 “ClearCollect(FilteredWorkReports,Filter(‘[SQL_Table_Name]’,ReportDateAsInt >= Value(Text(FromDate.SelectedDate,”[$-en-US]yyyymmdd”)) && ReportDateAsInt <= Value(Text(ToDate.SelectedDate,”[$-en-US]yyyymmdd”))))“.