Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate OptionSetInfo, prepare way for new ChoiceInfo function #2235

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

gregli-msft
Copy link
Contributor

@gregli-msft gregli-msft commented Feb 27, 2024

OptionSetInfo only returns one value, the logical name of an option set choice. We'd like to redesign this function to accommodate:

  1. The logical name is a text wrapped number for number and Boolean backed option sets coming from Dataverse. We recently added the ability to get at these values with the Value and Boolean functions which is a better way, strongly typed. Value and Boolean function support for number and Boolean backed Option Sets  #2230
  2. There are other pieces of information that are worth knowing, for example the color of an option set choice, that can't be accommodated with this design.
  3. Our preferred design is to return an extensible record of information. We could add an additional second argument with an enum to determine what information to return, with a default value of logical name, but this isn't our first choice.
  4. We don't use the term OptionSet any longer in Dataverse, it has been replaced with Choice, which is more consistent with our existing Choices function.

As some hosts may still be using this function, it will remain available as a function that can be enabled by calling config.EnableOptionSetInfo. Value/Boolean can be used immediately as a workaround, wrapped with Text if needed. We plan to add a new ChoiceInfo function with a separate PR.

@LucGenetier
Copy link
Contributor

✅ No public API change.

@gregli-msft gregli-msft marked this pull request as ready for review February 28, 2024 14:39
@gregli-msft gregli-msft requested a review from a team as a code owner February 28, 2024 14:39
@gregli-msft gregli-msft enabled auto-merge (squash) February 28, 2024 14:39
@LucGenetier
Copy link
Contributor

✅ No public API change.

Copy link
Contributor

@CarlosFigueiraMSFT CarlosFigueiraMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@gregli-msft gregli-msft merged commit 213a272 into main Feb 29, 2024
4 checks passed
@gregli-msft gregli-msft deleted the gregli/deprecate-osi branch April 16, 2024 23:20
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.

3 participants