Tuesday, May 23, 2023

Patch a multivalue field

 Patch(

'Painting Jobs', LookUp('Painting Jobs', ID=1), { ColorsChoice: [ {Value: "Red"}, {Value: "White"}, {Value: "Blue"} ] } )
OR
Patch( 'Painting Jobs', LookUp('Painting Jobs', ID=1), { ColorsChoice: colChoice // With colchoice having Value column } )

Wednesday, May 17, 2023

Converting a collection to JSON & Vice versa

 

 JSON(col_AllHistory, JSONFormat.IndentFour )

ClearCollect(col_AllHistory, ForAll( Table( ParseJSON( yourItemStoringJSON ) ), { ChangedBy: Text(ThisRecord.Value.ChangedBy), Comments: Text(ThisRecord.Value.Comments), DateOfChange: DateTimeValue(ThisRecord.Value.DateOfChange), Status : Text(ThisRecord.Value.Status) } ))

Check & Update if a value exists in multiple selection fields

 If coll_Origin is a collection containing Value as different option fields & OriginSelected is flag telling its selected or not, on an item display we can get the information as below

ForAll(var_SelectedItem.'Incident Origin' As Outer,UpdateIf(coll_Origin,Value = Outer[@Value],{

    OriginSelected:true}));

Thursday, May 11, 2023

Filter based on people field based on current user

 Filter(SPListName, User().Email in Productmanager.email) // This works only for single people picker selection

Filter(SPListName, User().Email in Concat(Productmanager,Email&",") // This works only for single people picker selection

Add Service Principle support in Custom Connector

  then search for "Streamlining Integration: Using Service Principal authentication on Custom connectors with Microsoft Graph Applicati...