cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACz
Frequent Visitor

Pull Data from Multiple Columns into Single Drop Down Menu

I have multiple sources of data feeding into a flow I do not control.  The dates from these sources are all formatted differently.  One Sharepoint list has a date column that only displays the beginning of the week date and then columns with the days of the week, eg.( Date     Monday Calls   Tuesday Calls   Wednesday Calls ).  The other Sharepoint lists have a date column but list the days of the week dates individually.  I am trying to work with the person that controls the flow and I have added columns in my share point list so they alter the flow to display the other dates all the days of the week eg.( Date     Monday Calls     2Date     Tuesday  Calls     3Date    Wednesday Calls).  Is there a way to have the columns Date, 2Date, 3Date feed into one drop down menu in Power Apps.  

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User III
Super User III

@ACz 

I believe in your case you want a little more "distinctness"

So, change to this:

With({_items: yourList},   //this is used just to provide a place for any filtering if needed.
   SortByColumns(
       Filter(
           UnGroup(
               Table(
                   {dates: Distinct(_items, Date)},
                   {dates: Distinct(_items, 2Date)},
                   {dates: Distinct(_items, 3Date)}
               ),
               "dates"
           ),
           !IsBlank(Result)
       ),
       "Result"
   )
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

ACz
Frequent Visitor

Thanks for the catch on the syntax error.  No those will not be the only two columns in my list.  I like to build things in baby steps since I am new to using Power Apps and still self teaching myself.  

View solution in original post

6 REPLIES 6
RandyHayes
Super User III
Super User III

@ACz 

Yes you can do this.

In general (and please revise the below to fit your scenario) this formula will give you what you want on your Items property of the Dropdown:

With({_items: yourList},   //this is used just to provide a place for any filtering if needed.
   UnGroup(
       Table(
           {dates: _items.Date},
           {dates: _items.2Date},
           {dates: _items.3Date}
       ),
       "dates"
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
ACz
Frequent Visitor

Thank you, this was helpful for jumping off point.  The script you provided did populate drop down with what appears to be blank dates and a date that does not appear in the Sharepoint List.  

RandyHayes
Super User III
Super User III

@ACz 

I believe in your case you want a little more "distinctness"

So, change to this:

With({_items: yourList},   //this is used just to provide a place for any filtering if needed.
   SortByColumns(
       Filter(
           UnGroup(
               Table(
                   {dates: Distinct(_items, Date)},
                   {dates: Distinct(_items, 2Date)},
                   {dates: Distinct(_items, 3Date)}
               ),
               "dates"
           ),
           !IsBlank(Result)
       ),
       "Result"
   )
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

ACz
Frequent Visitor

Thanks for the help again, but now I am getting several errors.  I have posted an image of the errors and not sure why records would all the sudden contain colliding fields of incompatible types.  

RandyHayes
Super User III
Super User III

@ACz 

First, you have a syntax error in your formula.  You has Distict where you should have Distinct.

Are TheBeggingOTW and NextDayOTW all Date columns in your list?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
ACz
Frequent Visitor

Thanks for the catch on the syntax error.  No those will not be the only two columns in my list.  I like to build things in baby steps since I am new to using Power Apps and still self teaching myself.  

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,968)