Email Us:
HomePostsPosts › Patch OptionSets From Text

Patch OptionSets From Text

When customising some functions or controls, we have found that sometimes you have a text version of a OptionSet value. If you want to patch this then Power Apps will error.

The following has helped.

Use "With" and a LookUp to get the value

If the custom control is called for example, ddCustomDropdown:

        locNameOfTheVarable LookUp(
            Text(Value) = ddCustomDropdown.SelectedItem.Value

Patch in the value that we stored in the "With" function

We stored the value as locNameOfTheVarable. We can now call that when we patch.

            'Table Name',
            Defaults('Table Name'),
                ChoiceToPatch: locNameOfTheVarable

Don't forget to put another ")" but you should be right to go.

Leave a Comment

First and Last Names
E-mail Address

Ready to Organise and Automate?

Message Us Message Us

Copyright © 2022 Initiative IT. Powered by Oncord