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 Platform Community / Forums / Power Apps / Drop down list disable...
Power Apps
Unanswered

Drop down list disable one choice after using in a gallery

(0) ShareShare
ReportReport
Posted on by 10

Hello everyone,

I am a beginner in power app and I am currently working on creating a Timesheet Power App.
I created a new timesheet page to submit new records and updating existing records (see : New timesheet page), datas are directly connected to a sharepoint list. 

I have trouble with management of the dropdown list "stream" in a gallery.
If "Project 1" is selected in the first item of the gallery, I want after generating a second line to create a second item in the gallery to disable the option to select "Project 1" in the dropdown list. Same action for all items N+1 until there is no more available project in my dropdown list.

Actually I tried 2 methods : 

(1)  This block well the selection of stream already used but  also update oldest item not in the sharepoint list but in the gallery and I don't undestand how I can prevent that.


Item of my drop down list : Filter( Stream, !CountRows( Filter( UsedStreams, Stream = Value ) ) ).Stream

Add button : Patch( Timesheet, Defaults(Timesheet_Audika),
{ Collaborateur:Collaborateur_1.SelectedText.Value,
Titre:Concatenate(Text(GUID())),
Semaine: Text(Week_dropdown.Selected.'Week Display'),
Stream: Stream_DB_3.SelectedText.Value });
ClearCollect(TimesheetLines,Filter(Timesheet,Collaborateur=User().FullName,Semaine=Week_dropdown.SelectedText.Value);
ClearCollect(UsedStreams, Distinct(Timesheet, Stream))

 

Saved in the sharepoint list button : Patch(Timesheet,ThisItem,
{Collaborateur:Collaborateur_1.SelectedText.Value,
Titre:Text((GUID()))),
Semaine: Text(Week_dropdown.Selected.'Week Display'),
Status : "Enregistré",
Stream: Stream_DB_3.SelectedText.Value,
Total_heures: Value(Total_H_3.Text)});

ClearCollect(UsedStreams,Distinct(Filter(Timesheet,
Semaine = Week_dropdown.SelectedText.Value &&
Status = "Enregistré" &&
Collaborateur = Collaborateur_1.SelectedText.Value),
Stream));

 

(2) I tried a second way adding || Stream =ThisItem.Stream it solve the first issue but my problem is not totaly resolve because when I create an item 2 i can select projet 1. I can't select projet 1 from the item 3 only.

 

Item of my drop down list : Filter(Stream_audika,!CountRows(Filter(UsedStreams,Stream = Value)) || Stream =ThisItem.Stream).Stream

 

Others function as 1 testing

 

 

Thank you for your help. I have conducted extensive research, but I am currently blocked due to these issues.

Categories:
I have the same question (0)

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard