Skip to main content
Community site session details

Community site session details

Session Id : WQ1CKKKlR3zRBYMtdpL/S2
Power Apps - Building Power Apps
Unanswered

Populating a dropdown with JSON data from a SharePoint column in an unusual way... possible?

Like (0) ShareShare
ReportReport
Posted on 18 Jul 2017 11:51:13 by

 

Hiya

 

I am trying an experiment. I have a client operating in a mine site in the middle of nowhere. Internet access is not guaranteed in certain areas of the site.

 

With that in mind, I have a SharePoint list with columns

 

Title, AuditType, ControlType, Width and ControlData

 

All, apart from the Width column are strings at present.

 

The Title column represents a question, ControlType can be "TextBox", "DropDown", etc

 

The intent of this list is that it contains a master list of questions, and the app chooses a subset of those questions based on certain criteria (using AuditType). This list has to work in offline scenarios, so I pull this data into a local collection and use SaveData(), just in case the workers are in an area with no wifi/internet.

 

I then put in a vertical Gallery on the page and set items to filter(MasterQuestions,AuditType=<audit>) and add a textbox and a drodown control to it. Each control is on top of the other (same XY position)  I then set the visible property of the textbox and dropdown to:

 

if(thisitem.ControlType="TextBox",true,false

if(thisitem.ControlType="DropDown",true,false

 

I set the width property to thisitem.Width

 

This has the intended effect... the control I want to use is displayed in the gallery. But I was hoping toĂ‚ set the items property for the dropdown to thisitem.ControlData and storeĂ‚ this in JSON format in SharePoint. Then I was hoping to use table() function to create it in the format that dropdown.items expects... ie

 

DropDown1.Items = table(thisitem.ControlData)

 

Unfortunately this does not work. I get the error "Cannot use a non-record value in this context".

 

Unfortunately I cannot use an EditForm because that can only bind to a live datasource and I need to use an in-memory collection as I described above.

 

Any ideas how I can achieve the end of aĂ‚ gallery with dynamic controls on it without using a dataform? In effect I am emulating that the data form does except against a collection

 

regards

 

Paul

  • Leo09 Profile Picture
    212 on 01 Aug 2017 at 09:11:10
    Re: Populating a dropdown with JSON data from a SharePoint column in an unusual way... possible?

    I think this could not achieve so far..

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete