I want "Male" or "Female" instead of 1 or 2 in my response can any one help me with this.
Below is my code,
var response = client.GetAsync("contacts?$select=firstname,gendercode&$top=2").Result;
if (response.IsSuccessStatusCode)
{
JObject body = JObject.Parse(response.Content.ReadAsStringAsync().Result);
Console.WriteLine("{0}", body);
}
else
{
Console.WriteLine("Error : " + response.ReasonPhrase);
}
Hello,
The easiest way is to include an additional header to your request. Check more information here - bengribaudo.com/.../dataverse-web-api-tip-formatted-values
Hi partner,
The picklist values you mentioned are values of optionset field?
The optionset field have value and label, what you need is label not value.
Maybe you can refer following link to get optionset field label:
Retrieve table definitions by name or MetadataId (Microsoft Dataverse) - Power Apps | Microsoft Docs
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,336 Most Valuable Professional
nmaenpaa 101,156