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

Removing a line from a dropdown after submission

Good morning everyone!

 

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.  So far its working great.  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.

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.  My current idea is to filter out any entry on the form where ID is > than 0.  Im new to powerapps and default back to Excel when trying to explain my idea.

 

Im stuck at the syntax of the filter using my current formula in the items for the dropdown, which is 

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

 

Thanks for any help or guidance!!

 

Chris

5 REPLIES 5
gabibalaban
Super User
Super User

@ckserra ,

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)

 

Hope it helps !

eka24
Super User
Super User

OnSuccess of the Form:

Collect(ColCountryTable,{SelectedItem:Dropdown3.Selected.Country})
 
Then in the Items property of the Dropdown:
Filter(CountryTable,Not(Country in ColCountryTable.SelectedItem))
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi gabibalaban!

 

That worked great, thank you very much!!!  One question I have is if I delete a line after I have created it in the app using the Remove formula, it works as it should, except instead of allowing only that entry to be redone, it allows all entries to be redone, which in my actual application could be bad for our end user.

 

Thanks again!

Chris

Hi gabibalaban!

 

That worked great, thank you very much!!!  One question I have is if I delete a line after I have created it in the app using the Remove formula, it works as it should, except instead of allowing only that entry to be redone, it allows all entries to be redone, which in my actual application could be bad for our end user.

 

Thanks again!

Chris

Hi eka24.  Your solution got me pretty close as well!  Issue I am now seeing is I am seeing a delegation warning on my dropdown, which is not a huge deal as my data shouldnt go more than 300 rows at the very most.  Also, when I delete an item, I am not able to reenter the data.

 

Chris

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,103)