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

Patch funtion not working inside gallery, but the same function working outside the gal

Hi All,

 

I have a patch function inside the gallery(to create a record in CDS) is not working, but the same patch works outside the gallery.

Just want to know is this bug or anyone faced the similar issue. Please let know for any suggestion/advice.

 

Thanks,

Bala

4 REPLIES 4
Super User III
Super User III

Can you show the formula that is not working

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24  Thanks for your reply,

Please find the Patch function below.

Patch(
'Approval Entity',
Defaults('Approval Entity'),
{
ApprovedRejectedFor: First(
Filter(
Employees,
Employee = ThisItem.employeeid
)
),
type: 'Type (Approval Entity)'.Rejected,
month: If(
Today() >= varCurrentMonthStartDate && Today() <= varCurrentMonthEndDate,
'Month (Approval Entity)'.Current,
'Month (Approval Entity)'.Previous
)
}
);

Hi@Bala9677 ,

Could you please share more about the scenario, do you want to write data back to the CDS entity?

If you can provide any screenshot of the app configuration, it will be appreciated

Considering that you have a Patch() in the gallery which means that there is a button inside your gallery, is that true? How do you configure a submit button inside or outside the gallery?

Actually, "Employee = ThisItem.employeeid", you quote ThisItem which will not work if you put this outside the gallery. What's more, I see different data structures in the formula, please make sure that you have make them matched.

 

Best Regards,

Qi

Community Support
Community Support

Hi@Bala9677,

Have you solved your issue?

If it solves your request, Mark it as a Solution to enable other users to find it.

Best Regards,

Qi

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (89,223)