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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add rows or columns dy...
Power Apps
Answered

Add rows or columns dynamically into a SharePoint list

(0) ShareShare
ReportReport
Posted on by 4

Hello,

 

I am building an app for our users where they have to input addresses from different companies. Every company can have multiple addresses (usually 1, but i could be up to 20). I dont want to display 20 empty columns on a form if in most cases only one is going to get filled.

 

Is there a way I can show the form with only the first address column visible and have the other columns show "on-demand". I was thinking of asking the user first how many addresses he wants to input and then displaying X amount of fields according to that number, but I don't know how to make this happen or if its even possible.

 

Thank you,

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Trapchaoz,

      

    What you are describing is a classic one-to-many relationship found in almost every database.  I suggest that you have two separate lists, Customers and Addresses, since one customer can have many addresses. You would then have a column in the Addresses list that is the Customer name from the Customers list.  (I avoid lookups and choice columns in Sharepoint because it is complicated to add records to them from Powerapps.)  You can then have a Dropdown with the Customer name and a Datatable control,filtered by the customer name to show the Addresses, or a second Dropdown that shows the addresses from the first dropdown. see Cascading dropdowns. 

     

    In looking over your specifications, I think that Shane Young has a You Tube for entering data into a gallery using repeating sections.  This is kind of how Infopath forms worked.  I suggest checking out https://www.youtube.com/watch?v=xgznk4XlPCo  Hope this helps.

     

     

     

     

     

     

     

     

     

     

  • Trapchaoz Profile Picture
    4 on at

    Hi @Drrickryp,

     

    Thank you so much for your reply. I am watching the video right now and it looks its exactly what I'm looking for. I will try to implement it and I'll let you know!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Trapchaoz,

     

    If it works out for you, could you mark this as solved please.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Trapchaoz,

     

    Have you solved your problem?

    Do you want to add Address columns (Data cards) dynamically within the Edit form of your app?

     

    I think your thought is proper, you could consider take a try to add a new Number column (called "The amount of Address you want to input") within your SP list data source, and this column is a required column. The end user must provide a vlaue for this column within your Edit form.

     

    I have made a test on my side, please take a try with the following workaround:4.JPG

     

     

    Set the Visible property of the Address1 Data card to following formula:

    If(Value(DataCardValue10.Text)>=1,true,false)

    Set the Visible property of the Address2 Data card to following formula:

    If(Value(DataCardValue10.Text)>=2,true,false)

     Set the Visible property of the Address3 Data card to following formula:

    If(Value(DataCardValue10.Text)>=3,true,false)

     Set the Visible property of the Address4 Data card to following formula:

    If(Value(DataCardValue10.Text)>=4,true,false)

     Set the Visible property of the Address5 Data card to following formula:

    If(Value(DataCardValue10.Text)>=5,true,false)

     .....

     

     Set the Visible property of the Address18 Data card to following formula:

    If(Value(DataCardValue10.Text)>=18,true,false)

      Set the Visible property of the Address19 Data card to following formula:

    If(Value(DataCardValue10.Text)>=19,true,false)

     Set the Visible property of the Address20 Data card to following formula:

    If(Value(DataCardValue10.Text)>=20,true,false)

    Note: The DataCardValue10 represents the TextInput control within the "The Amount of address you want to input" Data card control.

     

    The GIF image as below:Test1.gif

     

     

     

     

    Best regards,

    Kris

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 915

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 457

Last 30 days Overall leaderboard