web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using enum in CSX script
Power Automate
Unanswered

Using enum in CSX script

(0) ShareShare
ReportReport
Posted on by
Is there any examples of using enum in csx script. 
 
I need to use it in the context of DynamicSchema returned by the C# csx script.
 
I tried searching in the community forum and there is no post with detail on that.
 
Here is the script I am attempting.
 
....
      if (tabType.Equals("textTabs", StringComparison.OrdinalIgnoreCase))
      {
        response["schema"]["properties"]["tabs"]["items"]["properties"]["value"] = new JObject
        {
          ["type"] = "string",
          ["enum"] = getFonts(),
          ["x-ms-summary"] = "value"
        };
      }
    }

    return CreateJsonContent(response.ToString());
  }

  private static string getFonts()
  {
    return "[\"Arial\",\"Times\"]";
  }
 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 205 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 204 Most Valuable Professional

Last 30 days Overall leaderboard