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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint rows into c...
Power Apps
Unanswered

SharePoint rows into column

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have a business requirement to SharePoint column data divided into multiple rows by project.

Example: 

Project NameIT LeadDateText column
ABCDABCD ABCD
XYZXYZ  

 

Now based on the above data i want to create a collection that displays data in the below format.
severity is assigned as per column. So for date if it is blank severity 3 will be provided and if text column is blank then severity should be 5.

Project NameIT LeadColumnSeverity
ABCDABCDDate is blank3
XYZXYZdate is blank3
XYZXYZText is blank5

 

How can I accomplish this?

 

Thanks in advance!

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    If you are using a Gallery for example, on the Items property:

    AddColumns(Products,"Severity",If(TextColumn="",5,If(Dates="",3)))

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    on at

    @eka24 i would want to create a collection with 
    Project Name , IT Lead , Column comments , severity.

    So specifically, Under column comments it can be date column is empty and its severity. So the severity depends on column comments. 
    if the project record includes 10 columns for like date,text etc. , it needs to check for all the columns and create a report like below. I Hope i am making sense?
    Final output of collection needs to be 

    Project NameIT LeadColumn commentsSeverity
    ABCDABCDDate is blank3 (fixed and defined for date)
    XYZ XYZdate is blank3
    XYZXYZText is blank5 ( fixed and defined for text column)
  • eka24 Profile Picture
    20,923 on at

    Under the Column Comments, is "Date is Blank" and "Text is Blank" automatically inserted in your table?

    Am asking the question based on:

    "if the project record includes 10 columns for like date,text etc. , it needs to check for all the columns and create a report like below"

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    on at

    @eka24 there will be if criteria for each column. 
    Example: if date is blank then Column comments = "Date is blank"

    if text is blank then column comments  = "Text is blank"

    So the collection will contain 10 different rows for 10 different columns for a single project.
    is this doable?

  • eka24 Profile Picture
    20,923 on at

    I think you need to Show a sample table of the supposed 10 columns and also show the Output to make it clearer.

    The table you have shown does not make it explanatory enough

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    on at

    @eka24 So the input will be like below which is stored on a SharePoint list.

    Project NameUnitFunctionThemeStart DateEnd DateA Start DateA End DateStageStatus
    Test ProjectIT Social10/12/202011/12/2020  Started 

    The output for the above input from SharePoint List should be:

    Project NameIT LeadColumn Commentsseverity
    Test ProjectXYZFunction is blank2
    Test ProjectXYZA start date is blank5
    Test ProjectXYZA end date is blank5
    Test ProjectXYZStatus is blank5

    I hope this clarifies my requirement?

  • eka24 Profile Picture
    20,923 on at

    Create a collection using this:

    ClearCollect(
     ProjectCol,
     AddColumns(
     ProjectTable,
     "CommentColumn",
     If(
     Function = "",
     "Function is blank",
     If(
     StartDate = "",
     "StartDate is blank",
     If(
     EndDate = "",
     "EndDate is blank",
     If(
     Status = "",
     "Status is blank"
     )
     )
     )
     ),
     "Severity",
     If(
     Function = "",
     2,
     If(
     StartDate = "",
     3,
     If(
     EndDate = "",
     "5",
     If(
     Status = "",
     "5"
     )
     )
     )
     )
     )
    )

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    on at

    @eka24 This creates a record with 2 columns, however I need a collection with records for each column. 
    Current output is addition of 2 columns, column comments and Severity however I would want rows to be added for each column check as an individual record for a project in the collection along with severity of that column.

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Anonymous :

    I assume there is a table:

    ClearCollect(
     MyTestTabel,
     {
     'Project Name': "ABCD",
     'IT Lead': "ABCD",
     Date: Blank(),
     'Text column': "ABCD"
     },
     {
     'Project Name': "XYZ",
     'IT Lead': "XYZ",
     Date: Blank(),
     'Text column': Blank()
     }
    )

    Please add a button and set it's OnSelect property to:

    Clear(Result);
    ForAll(MyTestTabel,
     If(IsBlank(Date)&&IsBlank('Text column'),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Date is blank",Severity:3},{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Text is blank",Severity:5}),
     IsBlank(Date),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Date is blank",Severity:3}),
     IsBlank('Text column'),
     Collect(Result,{'Project Name':'Project Name','IT Lead':'IT Lead',Column:"Text is blank",Severity:5})
     )
    )

    /*Result is my custom collection to save the result*/

    50.gif

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    on at

    @v-bofeng-msft i have completed this requirement through multiple if condition and Patch method that patches the record to a collection and thus i am using that collection to view the data.

    Thanks for your input.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard