Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

ListBox usage

(0) ShareShare
ReportReport
Posted on by 180

Hello all

Is it possible to use a Listbox as follow: --> please see screenshot1

Screenshot1.jpg

I want to fill the 4 fields (green frame) and by cliking the button (red frame) the informations are visible in the ListBox.
With every cklick on the button, it should create a new row in the ListBox with these 4 fields.
By clicking on a row in the ListBox, it should shows the given inputs in the fields (green frame)
to make correcions and by clicking again on the button it updates the specific row.

Screenshot2.jpg


Is this even possible? if yes how to? If not, is there maybe another way to achiev this?

Thanks in advance
regards

Categories:
  • Unbihexium Profile Picture
    180 on at
    Table Value not recognized

    Hi Drrickryp

    Yup, exactly what I've tried, unfortunately I get almost always the same error. Something is missing and I cant figure out what.
    If I use my variable "Bestellliste" or "Bestellliste.Liste" as the Source in the patch function, I get the error "The specified column "Artnr" Is not available (or does not exist)" --> I've tried it with diffrent syntax variations...get always the same error.

    Unbihexium_0-1599142272906.png

    Unbihexium_1-1599142344164.png

     

    But if I use; "ThisItem.Liste" as the source in the patch function, I get no error but the items does not update my changes.

    Unbihexium_2-1599142483078.png

    Unbihexium_3-1599142773775.png

    think I getting closer.. but stuck the whole day with this issue here
    I keep working on it...
    Do you have any idee what Im doing wrong?

    regards

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: ListBox usage

    Annotation 2020-09-02 085352.pngHi @Unbihexium 

    You need to reference the textboxes and dropdowns above your gallery in the {} part.  That is where you will capture the data that you are changing in the underlying dataset.  Stay with it. I think you are getting close.

  • Unbihexium Profile Picture
    180 on at
    Re: ListBox usage

    thanks again! I will give it a try.

    at the moment I get an error:    "The specified column "Artnr." does not exist"

    Unbihexium_0-1599058939786.png


    Patch(Bestellliste.Liste; ThisItem.Liste;
    {Artnr: DataCardValue13.Text};
    {Bez: DataCardValue14.Text};
    {Mng: DataCardValue15.Text};
    {Date: DataCardValue16.SelectedDate})

    Unbihexium_1-1599059044792.png

     

    not sure why the column cannot be found ..I have declared it in the button above

     

    I will try it further tomorrow

     

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: ListBox usage

    Use two buttons, one inside the gallery to update the row with a Patch(dataset, ThisItem,{etc,... and the other outside the gallery to add a new item as you are doing.

  • Unbihexium Profile Picture
    180 on at
    Re: ListBox usage

    Hi Drrickryp

    Thanks for the hint. That was very helpful and works pretty good.

    Had to change the button properties to get the values separately...

    Unbihexium_0-1599054027043.png

    ... added one labe for each value to the Gallery...

    Unbihexium_1-1599054135383.png


    ...and I've set the default properties (TextInput field) as recommended = it works

    Unbihexium_2-1599054186699.png



    one last question:
    now I get the informations back in the fields (by clicking on the row) to make changes...
    what would be the best way to update the selected row? (For now it just creates a new row instead of update it.)
    with "if" function on the button? like "if selected; updatecontext " or won't this work? any recommendations?

     

    Thanks in advance
    regards

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: ListBox usage

    Hi @Unbihexium 

    You can set your TextInput box Default or hint to Gallery1.Selected.fieldname.  For the dropdown, set the default property to the same, Gallery1.Selected.fieldname.  Here is an example with the properties labeled: Gallery.png

  • Unbihexium Profile Picture
    180 on at
    Re: ListBox usage

    Hi Drrickryp

    I made it so far to get the informations to the Gallery.
    Now I would like to select the made entries, after I have select it, the given information appears in the text input fields to make corrections. Not sure how to achieve this... or is this not possible at all?

    How do I get the informations out of the collection?

    Thanks in advance for any hint

    01-09-2020 10-00-36.jpg

    regards

  • Unbihexium Profile Picture
    180 on at
    Re: ListBox usage

    Hi Drrickryp

     

    Thank you for the hint. I will try it with a Gallery

    Regards

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Re: ListBox usage

    Hi @Unbihexium 

    I rarely use a listbox because you can use a gallery to accomplish the same thing and it is much more flexible in terms of design. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard