Hi,
So I have a search bar where users can type in a vessel to find the vessel they need. I also want users to search a date so they can find that specific date they need.
The Item property for gallery is:
SortByColumns(Search( '[dbo].[tbl_Dailynoon_Report]'; txtSearch_NoonReport.Text; "Vessel"; "Date"); "Date"; If(SortDescending1; Descending; Ascending))
This doesn't work, sadly. The column "Date" is the problem, because when I remove it, the searchbar works. Probably has something to do that "Date" isn't in Text, but I don't know how to fix that.
I'm using SQL as a source, don't know if that matters.
Thanks for the help.
Solved! Go to Solution.
Hi @Saego,
Could you please share a bit more about your SQL Table data source within your app?
Which type of the Date column in your SQL table? Is it a Date only type or DateTime type column?
The Date type from SQL Server can't work with PowerApps (a known issue), if possible, please switch to DateTime type. Please check the following thread:
I have made a test on my side, if you want to filter the records of your SQL table based on the date or the vessel that you typed within the TextInput control (search bar), I afraid that there is no way to achieve your needs in PowerApps currently.
Best regards,
Kris
Hi @Saego,
Could you please share a bit more about your SQL Table data source within your app?
Which type of the Date column in your SQL table? Is it a Date only type or DateTime type column?
The Date type from SQL Server can't work with PowerApps (a known issue), if possible, please switch to DateTime type. Please check the following thread:
I have made a test on my side, if you want to filter the records of your SQL table based on the date or the vessel that you typed within the TextInput control (search bar), I afraid that there is no way to achieve your needs in PowerApps currently.
Best regards,
Kris
Hi @v-xida-msft,
Thank you for the quick answer. Yes, it's the type 'Date' so not 'DateTime' in SQL.
I'll try to change it to DateTime and I'm going to check if that works.
Thanks for the help.
So I changed it and have two problems now.
In SQL, the datetime for a certain field is now 2018-01-01 00:00:00.000, while in Powerapps it's 2018-01-1 01:00.
Is there a way to only show the date in Powerapps?
Then the second:
My formula for Items Gallery is now:
SortByColumns(Search( '[dbo].[tbl_Dailynoon_Report]'; txtSearch_NoonReport.Text; "Vessel"; "Date"); "Date"; If(SortDescending1; Descending; Ascending))
It still doesn't work. I'm sure that I need to convert the "Date" from DateTime to text in Powerapps, but I don't know how.
User | Count |
---|---|
124 | |
87 | |
87 | |
75 | |
69 |
User | Count |
---|---|
215 | |
181 | |
140 | |
97 | |
83 |