microsoft / microsoft/Power-Fx

Allow to add new Enumeration

Open
#683 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

as you allowed me to add a defined new Function to power-fx, Like this:
var config = new PowerFxConfig(); config.AddFunction(new HelpFunction()); var engine = new RecalcEngine(config);

I want to allowed me to defined new Enumeration for example:
{ EnumConstants.GenderEnumString, "%s[Male:\"male\", Female:\"female\", Other:\"other\"]" }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing PowerFxConfig, AddFunction, HelpFunction, and RecalcEngine to understand how extensions are registered. Compare that path with the requested EnumConstants.GenderEnumString example and determine the supported API and syntax for defining an enumeration. Done means a custom enumeration can be registered and used with the requested Male, Female, and Other values.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.