Hi guys I have code like
patch ( source, collection);
If(IsEmpty(Errors(source))
,patch ( source2, collection2)
,Notify(Concat(Errors(source), Column&": "&Message),NotificationType.Error,19500)
)
1
2
Mostly I get error 1 ... sometimes error 2... but I want to have only error 2... ( because I know which column)...
Really I don't understand why popup this 1 error.. ( i think it generated automatically if patch failure ?... I will understand it, but why does this 2nd message/error/popup doesn't override it?
Thanks for the advice because I started by p... with behavior this. 🙂
Solved! Go to Solution.
Hi @v-bofeng-msft ,
thanks, and yes it can be part of the solution.
For now, I handle this "default error" like this
Set(errorResponse,patch());
(IsError(errorResponse))
, and this working perfectly for now !.
BR,
John Doe 😉
To use the Patch() function in this way, the data source and the collection must have the same data structure. To troubleshoot your issue, this would be the first question that has to be answered. Your error indicates that one of the columns is read only so you may want to fix that too if you can.
I handle this with this :
ClearCollect(collection1,Filter(source1,ID = ThisItem.ID));
and now i add these too
ClearCollect(updateColletion,DropColumns(collection1,"Modified","Author","ComplianceAssetId","{FilenameWithExtension}","{FullPath}","{Identifier}","{IsFolder}","{Link}","{ModerationComment}","{ModerationStatus}","{Name}","{Path}","{Thumbnail}","{TriggerWindowEndToken}","{TriggerWindowStartToken}","{VersionNumber}"));
I want to test it... and if it happens in the future to know which columns I need to add to the Drop condition...
Why does it pop up sometimes...error 1 and sometimes error 2... its.... not logical for me
Thanks
Hi @ctpmthh ,
I suggest you to use ShowColumns to list the required fields.
ClearCollect(updateColletion,ShowColumns(collection1,"Column1","Column2"));
Best Regards,
Bof
Hi @v-bofeng-msft ,
thanks, and yes it can be part of the solution.
For now, I handle this "default error" like this
Set(errorResponse,patch());
(IsError(errorResponse))
, and this working perfectly for now !.
BR,
John Doe 😉
User | Count |
---|---|
247 | |
106 | |
82 | |
50 | |
43 |