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 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:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    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. 

  • Unbihexium Profile Picture
    180 on at

    Hi Drrickryp

     

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

    Regards

  • Unbihexium Profile Picture
    180 on at

    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

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    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

    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

    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

    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

    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

    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

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard