Functions/New-IAWidgetDataValueFieldMapsObject.ps1
Function New-IAWidgetDataValueFieldMapsObject{ Param( [Parameter(Mandatory = $true)] [Guid]$WidgetId, [Parameter(Mandatory = $true)] [Guid]$WidgetTemplateId ) $IAWidgetDataValueFieldMaps = Get-IAWidgetDataValueFieldMaps -WidgetTemplateId $WidgetTemplateId | Select-Object -ExpandProperty WidgetDataValueFieldMaps foreach($wdvfm in $IAWidgetDataValueFieldMaps){ $wdvfm.WidgetId = $WidgetId $wdvfm.PSObject.Properties.Remove('WidgetTemplateId') $wdvfm.PSObject.Properties.Remove('Id') } return $IAWidgetDataValueFieldMaps } |