cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NeelamDell
Regular Visitor

Network Error using Patch function in Canva App

I am getting this error while trying to foster an animal.

 

NeelamDell_0-1715768225819.png

 

can someone please help me with correct formula for patch.

 

formula I am using is on success- 

Patch('Animal tables',{'Microchip ID':'Foster Form'.LastSubmit.'Animal table','Shelter Status':'Shelter Status Choice'.'Claimed for Adoption'});
Refresh('Animal tables');
Navigate('Home Screen');
Notify("you have successfully foster an animal",NotificationType.Success)

 

 

12 REPLIES 12

why you used animal name as dropdown, isn't supposed to came from your home screen! meaning that when you click the animal you want to foster their (id) should be saved somewhere.

I have the same problem that I can't reflect status of the animal from "Ready for foster" to "Claim for foster)

NeelamDell
Regular Visitor

Thanks Aala, yes but somehow I am unable to do that logic. can anyone help? 

BCBuizer
Multi Super User
Multi Super User

Hi @NeelamDell , @Aala_95 ,

 

Can you please try the below?

Patch(
    'Animal tables',
    {'Microchip ID':'Foster Form'.LastSubmit.'Animal table'},
    {'Shelter Status':'Shelter Status Choice'.'Claimed for Adoption'}
);

 The reason this is more likely to work is because the second (record to update) and third (fields/values to update) arguments of the patch function are separated.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

hii @BCBuizer , The last requirement is (Ability to select an animal, enter foster family information and update the status to "claimed for foster“ on click of a button and the family that the animal is associated with) , which mean that to insert a new record in foster family table , and update the status of the selected animal from "ready for foster" to "claim for foster" in animal table. I have two questions: 1. how to update the animal status, knowing that its already shown in home screen, not in the foster screen 2. how to inert the entered data in from to foster family table. This is the code I used for insertion but its give me error: Patch('Foster Family Informations',Defaults('Foster Family Informations'),  {'Foster Claimer Name': FosterClaimerName_DataCard1.Text,     'Foster Location': FosterLocation_DataCard1.Text,     'Join Date':Joindate_DataCard1.SelectedDate} );
TianaFash
Advocate III
Advocate III

Hi @NeelamDell , 

 

How did you get the Animal Name Field to have a drop-down?  Refer to the image below: 

 

TianaFash_0-1715910025152.png

 

NeelamDell
Regular Visitor

@TianaFash  - I used a combo box to get the drop down for name.

BCBuizer
Multi Super User
Multi Super User

Hi @Esraa_k 


Has this issue been resolved? If so, please mark the post that was key to the solution by pressing the "Accept as Solution" button so it's easier to find for other members of the community.

 

Hi @TianaFash,

 

For questions that are not directly related to the issue for which the topic was opened, please open a new topic. Like that it is easier for other learners to find the answers in case they have similar questions.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,

 

I tried your solution inside of mine. But still getting the mandatory field error like @NeelamDell mentioned at first post. 

 

This is the ss for form:

Grkm_A_0-1715937386253.png

 

And the update button's function is:

 

Patch(
    Animal_Details,
    {NewMicrochipIdentity: Form1.LastSubmit.Animal_Detail},
    {NewFosterClaimer: Form1.LastSubmit.NewFosterClaimer},
    {NewAdopter: Form1.LastSubmit.NewAdopter},
    {NewForeverFamilyStory: Form1.LastSubmit.NewForeverFamilyStory},
    {NewDateofAdoption: Form1.LastSubmit.NewDateofAdoption},
    {NewShelterStatus: 'NewShelterStatus (Animal_Details)'.'Claimed for Adoption'}
);
Notify(
    "Animal Table successfully updated",
    NotificationType.Success
);
Set(varreset,false);
Set(varreset,true);
Refresh(Animal_Details);
Navigate('AnimalList Screen')

 

MicrochipIdentity , Animal Name , Animal Type, Age etc inherited from the first screen to filling automatically. 

BCBuizer
Multi Super User
Multi Super User

Hi @Grkm_A ,

 

I see you have a little too much curly brackets in your formula, please try:

Patch(
    Animal_Details,
    {NewMicrochipIdentity: Form1.LastSubmit.Animal_Detail},
    {
        NewFosterClaimer: Form1.LastSubmit.NewFosterClaimer,
        NewAdopter: Form1.LastSubmit.NewAdopter,
        NewForeverFamilyStory: Form1.LastSubmit.NewForeverFamilyStory,
        NewDateofAdoption: Form1.LastSubmit.NewDateofAdoption,
        NewShelterStatus: 'NewShelterStatus (Animal_Details)'.'Claimed for Adoption'
    }
);
Notify(
    "Animal Table successfully updated",
    NotificationType.Success
);
Set(varreset,false);
Set(varreset,true);
Refresh(Animal_Details);
Navigate('AnimalList Screen')

 

You can check the documentation for the Patch function for details: Patch function (contains video) - Power Platform | Microsoft Learn



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

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 (694)