cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ckserra
Helper III
Helper III

Part 2-Removing a line from a dropdown after submission

Hi everyone.  Asking for a little more help with my app.  

 

I have an app I am working on where a user selects an item from a dropdown, annotates some information on it, and submits it on the form. My next step would be to remove or filter out any item that has already been submitted.  For instance, my drop down has these 5 items.  This comes from a sharepoint list.  I cannot use a choice for this.

Goat

Duck

Bear

Horse

Deer

Once the user selects "Deer" and types in some information into the form and hits select, I would like "Deer" to disappear.  This form populates to a sharepoint list.  I need some control over this list where the end user can delete this Deer entry, and have it repopulate back into the list and be available for use again. I have the code to delete the entry.

 

This is the code I am currently using.  

I guess the easiest way to solve it is to have the dropdown items in a local collection. Try on OnVisible property of the screen to create it:

ClearCollect(myAnimals,SortByColumns('TTD Game List-Barton',"Seq_Order_TTD",Ascending))

 

Use as items property for dropdown the:

 

myAnimals

 

and OnSuccess property of the form use:

 

Remove(myAnimals,DropDown.Selected)

 

It works for the most part, but does not repopulate Deer back into the dropdown if I delete it from the sharepoint list, and if I choose another entry from the dropdown, other than the one that is displayed, it will NOT remove the one that is displayed, but will post it to the sharepoint list, but it will remove whichever is at the top of the dropdown, even if not selected.  

 

Im not married to this approach, but I am new to Powerapps, only working with it for a few weeks in my spare time.

Thanks for any help or guidance!!

 

Huge shoutout to @gabibalaban for helping me get this far!!!

 

Chris

0 REPLIES 0

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,047)