cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jup
Level: Powered On

Using SQL functions

Hi all,

 

I've just created a function in mssql:

 

1.PNG

 

This function delivers a table for 1 year with all german public holidays:

2.PNG

Great!!

... now I want to check in PowerApps wether a date (single day // eg.: "2019-06-27") is a public holiday. So I have to call the sql-function like this:

 

3.PNG

 

But how can I achieve this?

I have to call the sql-function with the YEAR ("2019") and the day date ("2019-01-01").

I want to get the fields "istFeiertag" and "feiertag" as result to display it on a text label in powerapps.

 

Any idea?

 

thanks in advance!

joerg

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Using SQL functions

Hi @jup ,

I'm afraid it's not suppoeted to call SQL functions currently in PowerApps.

I suggest you express your views on PowerApps Ideas Forum. Your precious advice will be very helpful for our work.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

As an alternative way, I suggest you use PowerApps functions to make this.

For example, if you want to get "istFeiertag" and "feiertag" from one specific item(date ("2019-01-01"), you could use this formula:(set it the label's Text)

LookUp(tablename,datum=Date(2019,01,01),istFeiertag)

LookUp(tablename,datum=Date(2019,01,01),feiertag)

 

Best regards,

Community Support Team _ Phoebe Liu

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

2 REPLIES 2
Super User
Super User

Re: Using SQL functions

@jup 

Calling a table based function in PowerApps is not currently supported.  There is an Idea on the idea forum that you might want to go and vote on for this.

 

That said, you could come up with some workarounds to perhaps utilize Flow for this and possibly also Azure Functions, but doing it directly is not an option.

 

I hope this provides some help for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: Using SQL functions

Hi @jup ,

I'm afraid it's not suppoeted to call SQL functions currently in PowerApps.

I suggest you express your views on PowerApps Ideas Forum. Your precious advice will be very helpful for our work.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

As an alternative way, I suggest you use PowerApps functions to make this.

For example, if you want to get "istFeiertag" and "feiertag" from one specific item(date ("2019-01-01"), you could use this formula:(set it the label's Text)

LookUp(tablename,datum=Date(2019,01,01),istFeiertag)

LookUp(tablename,datum=Date(2019,01,01),feiertag)

 

Best regards,

Community Support Team _ Phoebe Liu

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,131)