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

Community site session details

Session Id : ofUHl7rIFHG4SRytkHnNTE
Power Apps - Building Power Apps
Unanswered

Adding columns to a list

Like (0) ShareShare
ReportReport
Posted on 26 Mar 2019 15:58:35 by

Hi

 

I have a two sharepoint lists: one list (studentDetails) that contains details of students with studentID and another list (studentResults) that contains subjects, grades and studentID.

 

Each student may have sat none or a number of subjects that are storedper subject/per student in studentResults.

 

Using PowerApps how do I copy the contents of rows in studentResults into columns in studentDetails matching through studentID?

 

Any help would be great!

 

 

 

Categories:
  • v-yuxima-msft Profile Picture
    on 01 Apr 2019 at 09:44:21
    Re: Adding columns to a list

    Hi @Anonymous ,

     

    Is StudentName is singleLine and Subject in List one is Choice type? 

    I test as next with two methods:

    • List one columns: StudentName(SingleLine), Subject(Choices), Grade(Number) 
    • Method1:
    • List two columns: StudentName(SingleLine), Subject1(SingleLine), Grade1(Number), Subject2(SingleLine), Grade2(Number), Subject3(SingleLine), Grade3(Number)
    • Method2:
    • List two columns: StudentName(SingleLine),S_M(SingleLine),GM(SingleLine)

    App test:

    Method1:

    Add one dropdown control and rename it Dropdown1_Sname,Dropdown1_Sname.Items:'20190401listone'.StudentName

    Add three combobox controls, and rename them as ComboBox1_Subject,ComboBox1_Subject_2ComboBox1_Subject_3, their Items are same:ComboBox1_Subject/ComboBox1_Subject_2/ComboBox1_Subject_3.Items:Choices('20190401listone'.Subject)

    Add three textinput controls,and rename them:TextInput1_Grade,TextInput1_Grade_1,TextInput1_Grade_2.

    Then add one button, and rename it Button_Method1,Button_Method1.OnSelect:UpdateIf('20190401list2',StudentName=Dropdown1_Sname.Selected.StudentName,{Subject1:ComboBox1_Subject.Selected.Value,Subject2:ComboBox1_Subject_2.Selected.Value,Subject3:ComboBox1_Subject_3.Selected.Value,Grade1:Value(TextInput1_Grade.Text),Grade2:Value(TextInput1_Grade_1.Text),Grade3:Value(TextInput1_Grade_2.Text)})

    20190401Method1.PNG

    Method2:

    Add one dropdown control and rename it Dropdown1_Sname,Dropdown1_Sname.Items:'20190401listone'.StudentName

    Add one combobox control, and rename it ComboBox1_SubjectM2,ComboBox1_SubjectM2.Items:Choices('20190401listone'.Subject)

    Add one textinput control and rename it as TextInput1_GradeM2

    Add one Button control and rename it Button_Method2,Button_Method2.OnSelect:UpdateIf('20190401list2',StudentName=Dropdown1_Sname.Selected.StudentName,{S_M:Concat(ComboBox1_SubjectM2.SelectedItems,Value&","),GM:TextInput1_GradeM2.Text})

    20190401Method2.PNG

     

    Check the SP list:

    20190401SPlistMethod1&Method2Result.PNG

     

    Hope this could be helpful.

     

    Best Regards.

    Yumia

     

     

     

  • Community Power Platform Member Profile Picture
    on 29 Mar 2019 at 21:36:00
    Re: Adding columns to a list

    Hi Yumia

    Thank you, that is a good comprehensive answer.  I don't think I explained myself correctly.

     

    The simplified lists below can illustrate what I am trying to achieve:

    • List one columns: StudentName, Subject, Grade
    • List two columns: StudentName, Address, AcademicYear, Subject1, Grade1, Subject2, Grade2, Subject3, Grade3, Subject4, Grade4, Subject5, Grade5

     

    What I need to do is copy each of the records in List one into the correct record in List two.

    • The StudentName is the only common column
    • There are roughly fifteen subjects that a student may have choosen
    • There are between three and five entries per student in List one

    Once all entries have been entered into List one I woudl hope to be able to click a button and populate the Subject/Grade columns in List two with the corresponding List one records.

     

     

     

  • v-yuxima-msft Profile Picture
    on 27 Mar 2019 at 03:21:52
    Re: Adding columns to a list

    Hi @Anonymous ,

     

    Could you please share more details about your two SP lists and their column's type?

    Is the column single line? Choice or look up?

    I test them as single line as next:

    Data Souce:

    20190327sid1.PNG

    20190327spsubject.PNG

    App test:

    Add one gallery, and gallery.Items:'20190327studentID'

    Add one dropdown control, and Dropdown2.OnSelect:Distinct('20190327studentID',SID)

    Add one button control, and Button1.OnSelect:UpdateIf('20190327studentID',SID=Dropdown2.Selected.Result,{Subject:Concat(Filter('20190327Grade',SID=Dropdown2.Selected.Result).Subject,Subject&",")})

    20190327apptest1PNG.PNG

    20190327updategif.gif

     

    Then Result check:

    20190327resultcheck.PNG

     

    Hope this could be helpful.

     

    BestRegards.

    Yumia

     

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete