cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
barta
Frequent Visitor

AFTER LAST UPDATE

AFTER MANY YEARS PERFECT JOB and now

DO NOT WORK - Filter('[dbo].[ObedListek]';Datum>Today()) - now return empty collection - Datum is Date field in SQL table  

I must change to Filter('[dbo].[ObedListek]';DateDiff(Datum;Today())<=0)) - this work fine

 

Next new problem

DO NOT WORK - OnSelect on any inserted element (text,button,..) in DataCard in FormViewer (pointer changed on hand, but not fired Launch("..")) on the same screen Button out of FormViewer work fine.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @barta ,

Q1:

The reason why you met this problem is that:

Direct date filters do not work for SQL Server.

However, you can create a calculated column that will work. For instance, ALTER TABLE myTable ADD DateAsInt AS (YEAR([date]) * 10000 + MONTH([date]) * 100 + DAY([date])) and then filter on the calculated number column.

For example:

Filter(AddColumns('[dbo].[ObedListek]';
                  "newdate";
                  YEAR(Datum) * 10000 + MONTH(Datum) * 100 + DAY(Datum)
                  );
        newdate>Value(ToDay())
       )

Here's a doc about SQL Server connector for your reference:

https://docs.microsoft.com/en-us/connectors/sql/

 

Q2:

The reason why you met this problem is that you put the button inside the formviewer.

Since the formviewer's mode is View, the button's mode will change with it automatically.

So I suggest you put the button outside the form.😀

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @barta ,

Q1:

The reason why you met this problem is that:

Direct date filters do not work for SQL Server.

However, you can create a calculated column that will work. For instance, ALTER TABLE myTable ADD DateAsInt AS (YEAR([date]) * 10000 + MONTH([date]) * 100 + DAY([date])) and then filter on the calculated number column.

For example:

Filter(AddColumns('[dbo].[ObedListek]';
                  "newdate";
                  YEAR(Datum) * 10000 + MONTH(Datum) * 100 + DAY(Datum)
                  );
        newdate>Value(ToDay())
       )

Here's a doc about SQL Server connector for your reference:

https://docs.microsoft.com/en-us/connectors/sql/

 

Q2:

The reason why you met this problem is that you put the button inside the formviewer.

Since the formviewer's mode is View, the button's mode will change with it automatically.

So I suggest you put the button outside the form.😀

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,498)