cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dkent
Helper I
Helper I

Patching 2 sharepoint lists from button in powerapp canvas app

I seem to be having an issue with patching to 2 lists,

 

I have created a vacation request app. I have a a few controls that look up the total aloted days a user has in the List called Employee Matrix. When the user enters their requests, there are other controls that display the total of the lookup values minus the requested days. then the requestor is to click a submit button for a review process all of it works fine except the syntax to patch the Employee Matrix seems to error no matter what I try. The second patch is accepted and works fine with no issues. I can't think of why the first patch syntax isn't accepted. Any ideas?

dkent_0-1622068516710.png

 

 

 

12 REPLIES 12
CNT
Super User
Super User

@dkent Change, 'Sick Days': Value(fld_sdr).Text to 'Sick Days': Value(fld_sdr.Text)

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Thank you. I tried your syntax (image below) no difference.

dkent_0-1622093160127.png

 

@dkent What's the Error that u'r getting?

Seems ambiguous to me but . . . 

 

dkent_0-1622093833257.png

 

The odd thing i can past the patch below, but as soon as I change the list name ... i get that red curvy underline. 

 

It's weird to me, cause it will accept duplicate syntax, but a slight change ...

@dkent share the new screen please.

dkent
Helper I
Helper I

@CNT , not sure what you mean by new screen?

 

The patches are on the submit button on this screen:

dkent_0-1622094423831.png

The submit has syntax to navigate to a simple screen for end user comfort only . . . 

dkent_1-1622094563838.png

That screen has no task, it's simply a comfort screen so end user knows something happened

 

Is that what you were asking for?

 

@dkent That's helpful. But what I meant was, the new error you are getting.

Anyway, the error u shared appears when PA is not able to phrase the code (for whatever reason). I've come across this. Just cut that Patch bit and paste it into something like notepad. Clear all the white spaces in your code (between the previous line and the next line) and paste the code back into it's place. This could solve it. Let me know how you progress. 

dkent
Helper I
Helper I

@CNT  I edited from Note pad to:

Patch('Employee Matrix',Defaults('Employee Matrix'),{Employee:lbl_My_Name.Text,'Sick Days':Value(fld_sdr.Text),'Vacation Days':Value(fld_vdr.Text),'Carryover Days':Value(fld_cdr.Text)}); I still get the rejection.

 

dkent_0-1622096081094.png

 

I really hope this isn't annoying you. I appreciate all of your suggestions.

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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