web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Patch is not working in Forall loop

(0) ShareShare
ReportReport
Posted on by 8

Hello,

For me for some records below code is not working for some record it works. I am doing simple patch as below but somehow LoopUp or Filter is not fetching record, surprisingly for some record it works but for some it doesnt. I also tried to store same value to hidden label (ex label1.Text)in grid but same issue

ForAll(
Gallery1.AllItems,
Patch(D365Entity1,
First(Filter(D365Entity1, BatchText = ThisRecord.BatchText)),
{Column1: "TestValue", Column2: "test"});
);
or
ForAll(
Gallery1.AllItems,
Patch(D365Entity1,
First(Filter(D365Entity1, BatchText= label1.Text)),
{Column1: "TestValue", Column2: "test"});
);

If i give some hard code value to ThisRecord.BatchText= "B123" then it works.

ForAll(
Gallery1.AllItems,
Patch(D365Entity1,
First(Filter(D365Entity1, BatchText = "B123")),
{Column1: "TestValue", Column2: "test"});
);
can someone help why it is not able ot pick that value?

also i tried to store same value in temporary collection but i can see values of ThisRecord.Batchtext and Label1.Text also but some how patch is not picking up.

 

 

Thanks & regards,

Keval
@RezaDorrani, @Pstork1  can you please guide,thanks.
@

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 36 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans