cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bala9677
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
eka24
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.

Bala9677
Frequent Visitor

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

v-qiaqi-msft
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
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (58,762)