Skip to content

Add: support for formula definition in attribute creation options and…#143

Open
StepanHoudek wants to merge 1 commit into
TALXIS:masterfrom
StepanHoudek:users/stepan.houdek/formula.fields
Open

Add: support for formula definition in attribute creation options and…#143
StepanHoudek wants to merge 1 commit into
TALXIS:masterfrom
StepanHoudek:users/stepan.houdek/formula.fields

Conversation

@StepanHoudek

Copy link
Copy Markdown

This pull request introduces support for creating formula columns using Power Fx expressions in the CLI for Dataverse entity attributes. It adds a new --formula-definition option, updates the relevant data structures and command-line interface, and ensures that the formula is applied to all supported attribute types during attribute creation.

Formula column support:

  • Added a new FormulaDefinition property to CreateAttributeOptions, allowing users to specify a Power Fx formula when creating an attribute.
  • Updated the CLI command (EntityAttributeCreateCliCommand) to include a --formula-definition option, and documented its usage in the --type option description. [1] [2]
  • Included formula-definition in the list of shared parameter names in AttributeTypeRegistry.

Attribute creation logic:

  • Modified the attribute creation logic in DataverseEntityMetadataService to set the SourceType to 3 (Formula) and assign the formula definition for all supported types (string, number, decimal, float, money, bool, datetime, choice, multichoice) when the formula is provided. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Passed the formula definition through the CLI command execution and attribute creation pipeline, ensuring it is available wherever needed. [1] [2]

These changes enable users to create formula columns directly from the CLI, enhancing the flexibility and power of the Dataverse attribute creation workflow.… registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant