cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Power App to pull up Dataverse data and post it to SharePoint list.

Hi Community,

I have been working on an app for some months and it has evolved from a simple form input to post data to a SharePoint list, to the additional need to import external data into the Dataverse, selectable in the Power App form, to then add to rows in the SharePoint list.

 

External data is batch downloaded in xlsx format, comprising 4 entities (Department, Course Offering, Offering Name, Attendance). The Excel sheet was imported as one table into the Dataverse [I used the PowerQuery template to load the data into a new table, not the existing one (don't know if that was a wrong move?)] At the table set up stage in the Dataverse, I added an autonumbering column (“Review No,” - again not sure if this was the right move)

 

 I have a number of challenges:

 

  • The first three entities pull through correctly Department, Course Offering, Offering Name but Attendance is pulling through the auto number column instead (I think this has something to do with the Attendance being in percentage format). There are also 3065 rows of data in the Excel sheet (I've read about delegation issues and the max number of rows being 2000)
  • Not all the data appears to be pulling through. For instance, if the table is ordered alphabetically by Department, 6 records are visible (see screenshot below), but only 4 are pulling through into the form control.
  • Although I selected the searchable option in the Form, when I begin typing the first few letters into any one of the form controls, no results show.

Dataverse table view

mc00515_0-1681303066113.png

App Form view

mc00515_1-1681303116821.png

 

I need to have cascading lookup, whereby selections on the Course Offering form will cascade correctly to Department, Offering Name and Attendance data. 

 

Any guidance would be greatly appreciated.

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
Amik
Super User
Super User

Hi @Anonymous.

 

As noted earlier, there are too many topics here to unpack in a forum. It is difficult to diagnose your problem without looking at it inside your environment.

 

For example, not being able to connect to a Dataverse table already inside the app, even though it is already being used by a different screen, does not make sense to me (in fact

I never heard of this).

 

The syntax used in your expression: "Title = ddOfferingCode, Selected.Result" is not valid syntax.

 

Assume the screenshot is wrong because your formula looks correct. Although I do not understand why you’re argument is checking if the “Title” column equals the selected Offering Code ComboBox (no idea what Title  is, but it should be your Offering Code column).

 

I think you should close this post, and raise separate posts one problem at a time. The issue with not being able to connect your Datable table should be priority.

 

I wish you best of luck with this app. Feel free to @ me on your future posts.

 

-----------------------------------------------------------------------------------------------------------------------------

 

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

 


------------------------------------------------------------------------------------------------------------------------------


If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

If you like my response, please give it a Thumbs Up.

Imran-Ami Khan

View solution in original post

13 REPLIES 13
Amik
Super User
Super User

@Anonymous - You will find you will get more traction in community responses if you break your problem up into separate posts outlining a specific problem, as opposed to posting a giant problem with multiple components you need solved. It is unreasonable to expect someone to take the time to look into this entire scenario piece by piece. Something to consider for your next post!

 

Back to the problem.

 

Regarding the first issue. As I understand it:

 

  • You've imported an Excel table into Dataverse using Power Query. You say an Excel sheet was imported as one table into Dataverse. You also say it comprises of 4 entities (which in “Microsoft speak” means 4 tables). However by looking at your screenshot, I think you mean you imported one Excel table which contains 4 columns: Department, Course Offering, Offering Name and Attendance.
  • You added an Auto number column called Review No. into the Dataverse table.
  • You  have an App which uses this table as a data source and this App contains an Edit form control linked to this table.

When you say the first three columns “pull through correctly” - pull through in what? pull through correctly during the import process into Dataverse? Or do you mean pull through correctly in your Form?

Looking at the screenshot, I assume the data was imported correctly into Dataverse, so I am guessing the problem is that the Attendance field is not pulling through in your App?

 


------------------------------------------------------------------------------------------------------------------------------


If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

If you like my response, please give it a Thumbs Up.

Imran-Ami Khan

Anonymous
Not applicable

Thank you @Amik, I appreciate your constructive criticism. It took quite some time to articulate the challenges I am facing, and I half expected to get no response. Consider myself rebuked, it shall not happen again.

 

In my defence, I wasn't exactly sure where to begin on the smorgasbord of the multifactorial issues I, a relative novice, was challenged, especially with the Dataverse.  Thankyou again however, for being brave enough to grasp the nettle so to speak and give it a bash. 

 

Apologies also for the incorrect nomenclature. You are correct, I should have stated columns rather than entities (that's a novice for you!)

 

Yes, regarding the scope of the app, you more or less have summarised it correctly.

 

The excel import has the 4 columns. I added an additional column at the Power Query setup stage (called Review No), which is really an auto number. In retrospect, I think the addition of the auto number was unnecessary because the  Course Offering column would most probably do the job.

 

All data except that for the Attendance column pulled through correctly*. Somehow the autonumbers in the Review No, column are pulling through into the Attendance field (see image below).

mc00515_0-1681334182305.png

The Attendance data is supposed to be percentages as in the Dataverse. Somehow that field has picked up Review No. data (see next image):

mc00515_1-1681334290712.png

So that's the first issue. The second issue is that not all the data is pulling through to Department ( you can see from my previous post that 6 records exist in the Dataverse Department column as "107073-............". And yet the App is only pulling 4 records through. Not sure if this is because of a delegation issue that I have been reading about?

 

The third challenge is to achieve a cascading lookup ( my best guess is to base the primary lookup field as the Course Offering data, since that is unique.) So the app should let the user select the Course Offering, which in turn should pull up data for Department, Offering name and Attendance.

 

I have a 4th challenge, how to post that look up data into my SharePoint list ( I have already managed to do this for the other controls). I shall  however, reserve that for a separate query if I can fix the first 3 issues.

 

If you are able to take any one of the 4 issues and advise on that, I should be most grateful.

 

Sincerely.

 

 

 

 

Amik
Super User
Super User

Creating an auto-number column was probably unnecessary because Dataverse includes auto-number column type.

 

Focusing on the first issue for now, and sorry to state the obvious, but what is the Items property of the Data Card for Attendance?

 

picture1.png

 


------------------------------------------------------------------------------------------------------------------------------


If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

If you like my response, please give it a Thumbs Up.

Imran-Ami Khan

Anonymous
Not applicable

No need to apologise for stating the obvious. At this stage, I need it 🙂

 

Out of the gate, I decided to reimport the data without Review No, into a new table "Course Review Quality" (why does it add an 's' to make it plural? It comes out the other end as "Course Review Qualities") I honestly don't know how I managed it previously as the power query template let me upload the data to a new table. That caused confusion further down the track when trying to find the data source at the App interface. So I made things simpler this time and imported through the "Get from excel" option.

 

So here is Data card for the connection. You didn't ask for it but I have included it because I'm not sure if I am supposed to connect to the Dataverse gateway or to the Dataverse table or if it doesn't matter?

mc00515_0-1681376986637.png

The 4 column headers now are Department,  Offering Code, Offering Name and Attendance. Now Attendance is picking up the data from Offering Name.

 

Caveat: I'm wondering if the problem is at the import stage. When mapping the columns, I notice there was a default header called "Name". It doesn't represent anything close to my data, but you have to select it to make the import happen. It is here that I recall previously mapping Name to Review No. For this import, I aligned it to Offering Code, and Attendance is picking up that data up instead. See image below.

mc00515_1-1681377688976.png

So I now know why Attendance is picking up Offering code data. It's because by default it has adopted Name (which previously I said I had to map it to some value to get it to import, so I mapped it to Offering code)See below:

mc00515_2-1681378175064.png

Why it does that perhaps you would know. But that's where another challenge begins.

The primary text cannot find Attendance:

mc00515_3-1681378305782.png

 

It is in the Search Field however but, if I select it, I get an error:

mc00515_4-1681378445728.png

 

mc00515_5-1681378501367.png

 

What am I doing wrong?

 

 

Anonymous
Not applicable

 @Amik  Forgot to provide you with this...

mc00515_6-1681379265677.png

 

Amik
Super User
Super User

There is quite a lot to unpack here and we have not even started talking about your other issues. I do not think a forum is the best place for this but I will provide a rough steer.

 

As you correctly noted, during the import process, “Name” must be selected before you can proceed on executing the import. Name refers to the Primary Column of your Dataverse table. Think of the Primary Column as similar in spirit to the Title column in SharePoint - a table needs at least one column by default before it can be created. It is important to note that the Primary column is not the primary key column. A typical use case for a primary column would be an auto number column you can use in your Power Apps to identify records. If you ever need  to relate this table to another table, it is the Primary Column you will use to create the relationship. There are many resources online which can provide more detail.

 

Back to your problem. It seems rather than select Auto-generated during the import process, you selected one of your existing columns, hence the confusion.

 

picture1.png

 

What I would suggest is that you Create a new table in Dataverse without using an import. Go to the Home screen, select Tables on the left and then + New table.

 

picture2.png

 

 

 Configure the Primary Column by selecting the Primary Column tab.

 

picture3.png

 

Name this column to anything you want but be careful because the logical/schema name of it cannot be changed. As with SharePoint, you can still change the display name afterwards.

 

For example name this column “Record ID” and save. Note that you cannot change the data type of the primary column on initial creation of the Dataverse table. The default data type for this column is always single line text.  However, you do have the option to change it to a very handy auto-number column after you create the table.

 

Once the table has been created, create as many additional columns you need.

 

Next, click Import data from Excel and go through the mapping steps to map the columns in this table to your Excel file.

 

picture4.jpgpicture4.png

 

Once you have migrated your data, connect this table to your EditForm and let me know how you get on.

 

On a separate note, I strongly recommend you read up more on Dataverse. A good place to start are the wonderful starter tutorials from:

 

@ShaneYoung here: https://www.youtube.com/watch?v=kxxEC1xH9sI 

 

@RezaDorrani here: https://youtu.be/byUuEoDQjiU?list=PLTyFh-qDKAiHr7HwkvlHXpCNf73xNBqj_&t=732 

 

 

 


------------------------------------------------------------------------------------------------------------------------------


If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

If you like my response, please give it a Thumbs Up.

Imran-Ami Khan

Anonymous
Not applicable

Thank you for the update @Amik . I followed your guidance and I now get how the Primary column is supposed to work. I mapped the primary column to the first of the 4 columns (Offering Code) I mentioned importing to the Dataverse (shown below with the first line of data:

mc00515_0-1681428883201.png

I then connected these 4 in the app, but  Attendance is still not pulling correctly.

 

The actual data in Attendance is another issue. The actual import data on the Excel file is shown as percentages. The first line should read 81.9%, (First line shown below):

mc00515_5-1681430066675.png

 

As you can see, Dataverse converts it to a 3 decimal figure of 0.819.

 

mc00515_6-1681430137480.png

 

The greater issue however, is that the Attendance control is still pulling down the Offering code (which was mapped to the Primary column).

The 4 controls linked to the 4 imported columns are connected through this.

mc00515_1-1681429331845.png

And the view is this..

 

mc00515_2-1681429378719.png

I should point out that there are 14 controls on the form, but only 4 map to the Dataverse.  Consequently I cannot link the entire edit form to the Dataverse connecter, only the relevant controls.

 

As you can see, its pulling the  same data in Offering Code

mc00515_3-1681429659622.png

mc00515_4-1681429754684.png

There's something about the percentages it doesn't like??

 

 

 

 

 

Amik
Super User
Super User

A percentage is stored as a number divided by 100. Dataverse does not convert anything. If you want to FORMAT this column to DISPLAY as a percentage, this is not possible. The only alternative is to create a calculated formula which references the percentage column and adds a "%" sign. If you want to display the attendance column as a percentage in power apps, you can use a text function, .e.g Text(0.5,"0%").

 

Regarding the actual attendance data. I assume the Default property for the attendance DataCard is still ThisItem.Attendance and the DataCardValue is still Parent.Default?

 

picture1.pngpicture2.png

 


------------------------------------------------------------------------------------------------------------------------------


If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

If you like my response, please give it a Thumbs Up.

Imran-Ami Khan

Anonymous
Not applicable

Hi @Amik , I thought you were on to something for a minute there. When I checked, the Datacard default was still as you have stated, but the default value had no value. When I changed it to Parent.Default however, it didn't make blind bit of difference. I think this is why...

 

If I select the Edit Field option on any one of the first three controls (ie Department, Offering Code, Offering Name) I will see that name reflected in the Primary text, while the search option shows the Primary key field "Offering Code" (for eg see below for Department)

mc00515_0-1681457491190.png

However, when I do the same for Attendance, it cannot find it in the primary text.

mc00515_1-1681457639587.png

It's only visible in the search field:

mc00515_2-1681457728475.png

 

Understandably, if I select Attendance for the search field, the app breaks.

 

 

Thanks for the heads up about the percentage expression btw....

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,040)