From f3120b4fc38ea86fcdf842b175fae628c6a3b351 Mon Sep 17 00:00:00 2001 From: Jens Otto Hatlevold Date: Fri, 8 Nov 2024 19:57:43 +0100 Subject: [PATCH] Update AADGroups collection on environment change --- .../Src/DeploymentSettingsScreen.fx.yaml | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/CenterofExcellenceALMAccelerator/SolutionPackage/src/CanvasApps/src/cat_poweropsdevopsedition_7f3f4/Src/DeploymentSettingsScreen.fx.yaml b/CenterofExcellenceALMAccelerator/SolutionPackage/src/CanvasApps/src/cat_poweropsdevopsedition_7f3f4/Src/DeploymentSettingsScreen.fx.yaml index 27fb82339..e7cefa7ab 100644 --- a/CenterofExcellenceALMAccelerator/SolutionPackage/src/CanvasApps/src/cat_poweropsdevopsedition_7f3f4/Src/DeploymentSettingsScreen.fx.yaml +++ b/CenterofExcellenceALMAccelerator/SolutionPackage/src/CanvasApps/src/cat_poweropsdevopsedition_7f3f4/Src/DeploymentSettingsScreen.fx.yaml @@ -5704,6 +5704,20 @@ DeploymentSettingsScreen As screen: ) ) ); + Collect( + AADGroups, + { + id: "", + displayName: "" + } + ); + ClearCollect( + AADGroups, + Sort( + AADGroups, + displayName + ) + ); ClearCollect( TeamAADGroups, AADGroups @@ -5972,19 +5986,25 @@ DeploymentSettingsScreen As screen: SharepointSites: SharepointSitesSorted } ), - UpdateIf( - SolutionCanvasApps, - true, + With( { - CurrentValue: LookUp( - EnvironmentDeploymentSettings, - Name = "canvasshare.aadGroupId." & name - ).Value, - CurrentPermission: LookUp( - EnvironmentDeploymentSettings, - Name = "canvasshare.roleName." & name - ).Value - } + lclAADGroups: AADGroups + }, + UpdateIf( + SolutionCanvasApps, + true, + { + AADGroups: lclAADGroups, + CurrentValue: LookUp( + EnvironmentDeploymentSettings, + Name = "canvasshare.aadGroupId." & name + ).Value, + CurrentPermission: LookUp( + EnvironmentDeploymentSettings, + Name = "canvasshare.roleName." & name + ).Value + } + ) ), UpdateIf( SolutionFlows,