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 / Best way to show only ...
Power Apps
Answered

Best way to show only certain fields based on data source vale?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am in the process of building an IT Ticketing system, and for the most part, I've got the basics working (Form > Flow > SharePoint List > PowerApps ).

 

I'm currently in the early stages of setting up the app, to list view, detail view and edit the previously recorded IT issues from a Sharepoint List.

I've run into one major issue I'm not sure of the best way to handle:

 

I have 3 possible ticket types that my form can generate (Account changes (called account), Website issues (called website), and IT Related issue (Called IT ).

I can populate a variable with the value from the currently selected record, however I need/prefer a dynamic Details and Edit page that only shows the values that are relevant to each Ticket type.

 

I'm not sure if its best to create a full Scrollable screen for each record type that is customized to edit the previously selected record, or if I should just create a display/Edit form for each type on a single scrollable page, and only show the relevant form.

 

I'd like opinions on either option, or if there is a whole other better way to handle this then I currently am.

 

Also, I'd like to know how to hide a form based on the currently selected record from the Main window list view.

 

Thank you in advance!

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you tell me

    1)whether these tickets data are saved in the same sharepoint list?

    2)do you want to display detail form or edit form based on selected ticket?

    I assume that all the tickets are saved in the same list.

    If so, using one edit form and one display form is enough.

    You just need to set the form's Item to:

    Galleryname.Selected

    Then the form will display the selected ticket's data.

    If you want to open an edit form, set the navigate button like this:

    EditForm(Formname)

    If you want to open a display form, set the navigate button like this:

     

    ViewForm(Formname)

     

    Formula like this could change the form's mode.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Hello,
    Yes all tickets are stored into a single sharepoint list. Its a single form that users fill out for each issue, and the form only asks questions related to their problem. Flow then transfers those answers to a SP List, which I then suck into my power app.
    I'm just trying to make the app somewhat intelligent where it doesn't bother showing me blank answers for unrelated problem types.

    I'll try your recommendation and report back if I get it working or not.

    tyvm!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello,

    I started to try your recommendations, and I realise I dont think you understood my real question.

    I know how to load data within both a form and button, however what I'm trying to do is the following:

     

    I have a list of tickets. Each ticket can be either an account, website or IT issue. Each ticket has this set as a field option within the SP List called "IssueType".

    What I would like, is that when I'm on the List view of tickets, if I click the > button, instead of loading a generic details page, it loads a record type specific details page.  What I'm not sure of, is if I should load a single scrollable screen with 3 forms on that scrollable page, and only make 1 of the 3 forms visible based on the ticket type, or should I have 3 whole scrollable pages for each ticket type, and have the > button send me to the correct page based on the ticket type.

    I'm not sure if one is better then another (both performance/load time wise, best practices), and/or if both or either one of the options are even possible.

     

    I've tried applying a formula to a form's visibility, but I always get an error:

    The formula I've tried is:

     

    If(LookUp(HelpDeskTickets,IssueType.Value) = string("account"),true,false)

     

    But this always indicates an error of "Invalid argument type (text), Expecting a Boolean value instead.

  • Verified answer
    WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    Hi @Anonymous ,

    If you had three separate forms, you would do something like this on the OnSelect of the Gallery - I have called the Field below Issue - change to your name (and screen names)

    Switch(
     ThisItem.Issue,
     "Account", Natigate(AccountScreen),
     "IT Issue", Natigate(ITIssueScreen),
     "Website", Natigate(WebsiteScreen)
    )

    The Item of each of the forms would be 

    YourGalleryName.Selected

    and the DataSource

    IssueType

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Warren,

     

    I only had a chance to work on this now, I tried to implement it but I get:

    OC-ITServices_0-1594780666127.png

     

    It seems as though Switch cant evaluate the current item due to scope.

  • WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    Hi @Anonymous ,

    The issue is not Switch - it is saying ThisItem is not available from where you are running this code. ThisItem only applies to controls inside a gallery or form - where is your situated?

  • WarrenBelz Profile Picture
    153,789 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard