Skip to main content

Notifications

Power Automate - AI Builder
Suggested answer

importing Excel file into dataverse (Model driven app) choice field

(0) ShareShare
ReportReport
Posted on by 36
Hey
I have come across an issue that I seem to not be able to solve. 
 
Inside a sharepoint folder i have an excel file that I need to import into into the model driven app (dataverse)
 
The issue is regarding choice field. In the excel file I get the string value, however, dataverse seem to only be accepting the choice value that is inside dataverse. This is causing a problem because I dont have the choice value(integer). 
Until the parse json it is all fine. After the Parse Json I am left with the string name. In the table there is 10 different types of choice fields. A dropdown can have up to 25 different choices. Switch is therefore not an option as i understand. I then tried (second picture) to create and append the variable however this is only used for one choice field. 
 
So my question is: How can i do this in the most easy way? because now this is not really working the way i want it. :)
 
 
Categories:
  • Suggested answer
    RyanAutomates Profile Picture
    RyanAutomates 70 on at
    importing Excel file into dataverse (Model driven app) choice field
    Hi there,
     
    When you import data into Dataverse, it's important to make sure the values are in the correct format that Dataverse wants, there is no other way (that I know of) to import this data.
     
    I would suggest transforming the data before you pick it up in your flow, by looking into Dataverse (either using a solution, the power apps level up extension for chrome, or sql4cds querying the stringmap table) and matching each option with its integer value for each field and making a rule or condition in the excel sheet to change this data so your flow can read it (you could possibly match them in Power Automate by retrieving the options from the stringmap table filtering for your fields and then altering your JSON in the flow, but it seems like extra work, although if you built it this way you wouldn't need to update the excel sheet each time an option was added or removed - I prefer to keep my flows simple).
     
    Then if you parse JSON with the correct integer values, I expect it should work.
     
    Hope this helps! :)
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard