cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tom_Slosse
Memorable Member
Memorable Member

Check whether a record is already present and disable a button in a Gallery

Hey all,

 

 

 

I'm struggling with the following.

I want to disable an icon when the record has been saved into a SQL database.

 

I've tried many ways and the closest I've reached is that it disables all the icons in the gallery, but I only want the icon disabled when the matching record is already saved in the SQL database.

 

Any ideas how to achieve this?

 

In the attacments you will find some screenshots to make it a bit more clearer.

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom_Slosse
Memorable Member
Memorable Member

Hey all

 

 

After a long time searching and trying out alot of different things I've found the solution to my problem.

The solution was pretty simple afterwards.

 

But this is what I did on the DisplayMode of my Icon:

If(Body1_1.Text in First(Search('[dbo].[Jobresults]',Body1_1.Text,"F_PPN_ID")).F_PPN_ID, DisplayMode.Disabled,DisplayMode.Edit)

So I didn't have to check whether it was empty or not, I just had to check with the in whether a field on my gallery (Body1_1.Text) was equal to a field (F_PPN_ID) in my database.

 

Hope this helps other people too.

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

View solution in original post

1 REPLY 1
Tom_Slosse
Memorable Member
Memorable Member

Hey all

 

 

After a long time searching and trying out alot of different things I've found the solution to my problem.

The solution was pretty simple afterwards.

 

But this is what I did on the DisplayMode of my Icon:

If(Body1_1.Text in First(Search('[dbo].[Jobresults]',Body1_1.Text,"F_PPN_ID")).F_PPN_ID, DisplayMode.Disabled,DisplayMode.Edit)

So I didn't have to check whether it was empty or not, I just had to check with the in whether a field on my gallery (Body1_1.Text) was equal to a field (F_PPN_ID) in my database.

 

Hope this helps other people too.

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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