Public/Get-BcAppField.ps1
function Get-BcAppField { [Alias('Export-BcAppDataModel')] param ( [Parameter(Mandatory, Position = 0)] [string]$Path ) Get-BcAppSymbolReference -Path $Path | ConvertFrom-Json | Select-Object -ExpandProperty Tables | ForEach-Object { $CurrentTable = $_ $CurrentTable | Select-Object -ExpandProperty Fields | ForEach-Object { $CurrentField = $_ [PSCustomObject]@{ PSTypeName = 'UncommonSense.Bc.DataModel.FieldInfo' #Table = $CurrentTable TableID = $CurrentTable.ID TableName = $CurrentTable.Name #Field = $CurrentField FieldNo = $CurrentField.ID FieldName = $CurrentField.Name FieldType = $CurrentField.TypeDefinition.Name FieldClass = $CurrentField.Properties | Where-Object Name -EQ FieldClass | Select-Object -ExpandProperty Value FieldOptionMembers = $CurrentField.Properties | Where-Object Name -EQ OptionMembers | Select-Object -ExpandProperty Value } } } } |