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 / Need some help nesting...
Power Apps
Answered

Need some help nesting ShowColumns into a formula

(0) ShareShare
ReportReport
Posted on by 628

Community,

 

I am not sure how to properly nest in ShowColumns into the below formula:

 

SortByColumns(
 Filter(
 AddColumns(
 'ESN Ticket Tracker',
 "City",
 LookUp(
 'Networking Device List Master',
 'DNS Entity Name' = 'ESN Ticket Tracker'[@cj7y],
 City
 ),
 "State",
 LookUp(
 'Networking Device List Master',
 'DNS Entity Name' = 'ESN Ticket Tracker'[@cj7y],
 State
 )
 ),
 Status = 'Status Dropdown'.SelectedText.Value,
 If(
 'All States Checkbox'.Value = false,
 State = 'State Dropdown'.SelectedText.Value,
 State = State
 ),
 If(
 'All Cities Checkbox'.Value = false,
 City = 'City Dropdown'.SelectedText.Value,
 City = City
 )
 ),
 "Created",
 Descending
)

 

Any help is appreciated.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @dlprentice 

    Can you explain what it is that you are trying to accomplish and why you need to use ShowColumns in your scenario?

     

    Your formula, as-is, needs a couple of adjustments to begin with:

    SortByColumns(
     Filter(
     AddColumns(
     'ESN Ticket Tracker' As _item,
     "City",
     LookUp('Networking Device List Master',
     'DNS Entity Name' = _item.cj7y,
     City
     ),
     "State",
     LookUp(
     'Networking Device List Master',
     'DNS Entity Name' = _item.cj7y,
     State
     )
     ),
     Status = 'Status Dropdown'.SelectedText.Value &&
     // This should be changed to not use the deprecated SelectedText property
     ('All States Checkbox'.Value || State = 'State Dropdown'.SelectedText.Value) && 
     // This should be changed to not use the deprecated SelectedText property
     ('All Cities Checkbox'.Value || City = 'City Dropdown'.SelectedText.Value)
     ),
     "Created",
     Descending
    )

     You should change your formula to not use the SelectedText property as it is deprecated.  

     

     

  • dlprentice Profile Picture
    628 on at

    Hey Randy,

     

    I appreciate you setting me straight on my formula 🙂

     

    Basically each item displayed on the data table is hyperlinked to a different page so more details can be displayed for the selected item.

     

    1.png

    2.png

     

    All of this seems pretty standard, but I can't display all of data I'd like to because the table isn't loading all of the data unless I add its column (at least it doesn't appear as though it is being loaded into context...). So my goal is to have additional data displayed that I'd like to not display and clutter up on the main page.

    3.png

    I would do a "Display", "Forms", but I am unsure of how to place the output of the data table into a collection to feed into the Form as a data source. If you have some ideas on whether or not using labels vs Forms with collection in this case is the best option please elaborate if willing.

     

    Hopefully this is a clear and detailed response!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @dlprentice 

    As for options,

    - Forms are much easier to works with. 

    - Collections stay away from them!  You don't need them unless you need an in-app database for some reason.  Your app already has all the data...why duplicate it again into a collection?

     

    Now, what I am confused on - in your initial post you were adding two columns.  I am understanding better now that you want these to display in the Gallery as well as the detail screen.  

    The reason (as I gather) is that these columns do not exist in your data record from 'ESN Ticket Tracker'

    Is that a correct assumption?

    If so, then based on that, I would provide added records to the Items property of the Gallery for the record from the other datasource that has all the values you need.  These will be considered "read only" from here forward, so if you are also needing to be able to edit those values, then let me know that as well.

     

     

     

  • dlprentice Profile Picture
    628 on at

    @RandyHayes 

    -Yes forms are easy, good point!

    -Correct, I am adding two columns because they do not exist in 'ESN Ticket Tracker', and do exist in 'Networking Device List Master'.

     

    I don't quite understand the last part of your reply. Would this be the ShowColumns() so that these can be loaded into context? Would this be on the first page (the one with all the records listed) or the details page? I can provide more details if that will help.

     

    The original formula I pasted is the Items of the data table.

  • dlprentice Profile Picture
    628 on at

    @RandyHayes 

     

    I know you are busy but, would you mind elaborating on this part? Maybe an example?

     

    If so, then based on that, I would provide added records to the Items property of the Gallery for the record from the other datasource that has all the values you need.  These will be considered "read only" from here forward, so if you are also needing to be able to edit those values, then let me know that as well.


     

  • Verified answer
    dlprentice Profile Picture
    628 on at

    Following up to answer my own question. I didn't need to use ShowColumns() adding additional columns allowed me to accomplish what I was trying to accomplish. I didn't realize ShowColumns() drops other columns.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard