cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Grey Out Button Based On Data Card Value of a Display Form

Hello Community,

 

I hope this message finds you well. There is a Screen that I have a form that shows the full information of the animals of choice selected by the user as well as a button that proceeds the user to a confirm page to let them finalize their fostering or adopting. To ensure that the user cannot foster or adopt an already adopted animal, I would like to grey out the button on that page so that users can only click it if the Status of the animal on the display form is either Ready for Foster, Ready for Adoption. 

 

I have tried referencing the DataCard in my IF statement under the button's Display Mode property but no success. Can someone please help me URGENTLY!!! I have attached an image of my screen and how my formula looks. One of my formulas is a comment as well as the main one. If anyone can clarify why both don't work I will be so grateful.

 

Thank you so much!!!

20 REPLIES 20
Oyin
Advocate V
Advocate V

Hi @ZeeScience ,

 

I took a different approach, maybe it could be of help. I already filtered only Ready for Foster status (views in model-driven app) animals to appear in my gallery.

Here's my gallery formula: 

Item = Search(Filter('Animal Details','Animal Details (Views)'.'Ready for Foster'),txtSearch.Text,'Shelter Name')

my home screen.png

 

mandela
Responsive Resident
Responsive Resident

You should reference the field value within the form and not the datacard itself like :

If(shelterstatus.Text="Adopted",DisplayMode.Disabled,DisplayMode.Edit)

 

I wanted to know, for your Current Location table column, did you use the Power Fx formula, if so how did you do that part. If you did not use power FX, how did you make the current location change from shelter to foster home?

The current location is still Shelter.
 
From my understanding of the task, submitting the form should trigger the shelter status to change from 'Ready for Foster' to 'Claimed for Foster'. 
 
I added the option 'Claimed for Foster' to my Shelter status choices in the Animals table and set the status to change at the click of the submit button in canvas app with this formula:
 
Patch('Animal Details', {'Animal Detail': Form1.LastSubmit.'Animal Detail', 'Shelter Status':'Shelter Status (Animal Details)'.'Claimed for Foster'}); Refresh('Animal Details'); Navigate('Home Screen'); Notify("You have succesfully claimed an animal to foster", NotificationType.Success)
 
'Claimed for Foster' is different from 'In Foster Home' as it is just newly claimed not in foster home yet. The email in power automate task then provides details for pick up to the foster home. So in reality, Shelter is still the current location.
 
The same logic is applied in 'Claimed for Adoption' if you check the table in the screenshot below. Animals claimed for adoption are still in foster home and not forever family home. That would only change when the status changes to Adopted.
 
claimed for adoptn.png
 
 

I think you misunderstood my question, but thank you for explaining this part of the challenge. I was able to do some research and answer the question

Did you do any validation based on the type of animal in the shelter? Because I saw the Shelter Table and it lists the type of animals it takes. How did you edit your Model-Driven App filter to ensure that each specific view can be filtered by Animal Type, Shelter Status and Shelter Name?

I did not do any validation based on shelter types. My shelter types is a text field. If I understood the task correctly (filter by animal type), the screenshot below is how I hope to satisfy this requirement. If you have contrary or other ideas, pls share. I'm open to that.

 

Filter By.png

How does your filter look like that

Hi @ZeeScience , I don't understand your question. Can you post yours?

Helpful resources

Announcements

Important Update | Power Up Community READ ONLY July 22 – July 28

Dear Community Members, As you may have read, the Power Platform communities are transitioning to a new platform and to access will be set to READ-ONLY mode during the transition. Key DatesTo ensure current learners have adequate support in the final week of the cohort, the Power Up Program Community will transition to READ-ONLY mode starting July 22nd, the platform will transition to READ-ONLY mode until July 28th. Power Apps, Power Automate, and Power Pages communities will be read-only July 16-22, 2024.During this period, members will not be able to start new threads or Kudo, Comment, or Reply to any posts, but will be able to search and review past threads or solutions. On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities. Learners will be able to sign in to the new Power Up Program community experience, starting July 29th. If you registered for community using your learnwithpowerup account, you will not receive an email, but should be able to sign in successfully if you are signed in to My hub.  If you need help with your community account, please submit a request at aka.ms/PPCommSupport We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead! 

Learn what to expect in the Power Up Program

Since its inception in 2022, the Power Up Program has evolved based on feedback from learners and Microsoft Partners and customers. Today's Power Up learners can expect to learn the fundamentals of Microsoft Power Platform in the accelerated seven-week, video-based Power Up Maker course.   Hear from Principal Program Manager, Dimpi Gandhi to discover the latest enhancements and meet the Microsoft MVPs, Rory Neary and Charlie Phipps, who partnered with the Microsoft Power Up Program to create the Power Up Maker course to guide learners to use the Microsoft Power Platform to develop custom applications, build dazzling report dashboards, or create efficiencies through automation.  

Welcome to the Power Up Program Community

The Power Up Program is a free upskilling program where nontechnical people can learn the fundamentals of Microsoft Power Platform. The Power Up Maker course is a seven-week self-paced virtual learning plan that include video-based objectives featuring Power Apps, Power BI and Power Automate.  As a member of the Power Up Community, you can grow your skills and build connections. You can post questions to get help with the curriculum and hands-on exercises from experts and peers in the product boards.  Check out the Community Information & Feedback board to find help or provide feedback with the community experience, and please take time to post in the Social board to tell us more about yourself. If you're new to the Power Up Program and looking for information to register. You can sign up at PowerUp.Microsoft.com.

Users online (1,251)