Hi everybody,
haven't found an answer yet.
I am using a dropdown control in a gallery to update values to ThisItem.
These values are then saved with a button "save" in a collection "colFragenToSave" (also in ThisItem).
The button should be disabled as long as no selection has been made.
In the collection I added a column called "SaveVisible" which returns true or false and thus controls the DisplayMode.
I put the OnChange-property of this dropdown to:
Patch(colFragenToSave;ThisItem;{SaveVisible:true})
The button then is in DisplayMode.Edit, but the selection of the dropdown felt back to default - what it shouldn't do.
Hope U understand my problem 🙂
What am I doing wrong?
Hi,
I've solved it by a workaround:
When I navigate to that screen, I set a variable for the Default-property to " " (which means empty). With the Patch-function of the OnChange-Property from the Dropdown, I set this variable to the dropdown.selected.value.
Works fine 😉
sure 🙂
In "Gallery.png" you can see the whole screen. The others show what happens.
Hope that helps...
Sorry I didn't clearly get what is the issue being faced by you?
Could you share multiple screenshots of the issues being faced by you?
thanks for your prompt answer @Manan-Malhotra .
I've set everything you've mentioned. Now in the whole gallery the Save-Button is active - it only should be at "ThisItem". (That's the reason, why I try to force it within the collection.) Also the Dropdowns of all questions (or ThisItem) is set to the first selected.
Any other suggestions?
Maybe I describe more background:
I try to create an Audit-App for suppliers. In one collection I store the questions, in the gallery the purchaser give the answer a rate, add a note and hit the Save-Button to save the results in an other collection. (Everything also works as an offline-app)
here the code for the OnSelect-Property of the save-button:
If(ThisItem.Farbe=White; //if background color eq white means it's a new question to save - else Lookup in Results for the saved results. Farbe = own column in the collection
Patch(colResults;Defaults(colResults);{AuditIdentify:First(colLieferantGewählt).Lieferantennr&Text(Now();"[$-en]ddmmyy");Bewertung:Value(Dropdown3_1.Selected.Value);ErgEbeneOKat:ThisItem.EbeneOKat;ErgEbeneUKat:ThisItem.EbeneUKat;ErgOberKat:ThisItem.OberKat;ErgUnterKat:ThisItem.UnterKat;FragID:ThisItem.ID;Frage:ThisItem.Frage;Gewichtung:Value(Dropdown1_1.Selected.Value);'zur Kenntnis genommen':DataCardValue16_1.Value;LiefIDKredListe:First(colLieferantGewählt).ID; Notiz:TextInput1_1.Text;Title:First(colLieferantGewählt).Lieferantennr });
Patch(colResults;LookUp(colResults;FragID=ThisItem.ID);{AuditIdentify:First(colLieferantGewählt).Lieferantennr&Text(Now();"[$-en]ddmmyy");Bewertung:Value(Dropdown3_1.Selected.Value);ErgEbeneOKat:ThisItem.EbeneOKat;ErgEbeneUKat:ThisItem.EbeneUKat;ErgOberKat:ThisItem.OberKat;ErgUnterKat:ThisItem.UnterKat;FragID:ThisItem.ID;Frage:ThisItem.Frage;Gewichtung:Value(Dropdown1_1.Selected.Value);'zur Kenntnis genommen':DataCardValue16_1.Value;LiefIDKredListe:First(colLieferantGewählt).ID; Notiz:TextInput1_1.Text;Title:First(colLieferantGewählt).Lieferantennr }));;
If(And(DataCardValue16_1.Value;Dropdown3_1.Selected.Value=" "); // Change Backgroundcolor of ThisItem
Patch(colFragenToSave;ThisItem;{Farbe:RGBA(220; 220; 220; 1);IsChosen:false});
Patch(colFragenToSave;ThisItem;{Farbe:RGBA(166; 166; 166; 1);IsChosen:false}));;
Set(varFragenBeantwortet;CountIf(colFragenToSave;!IsChosen));;
If(varAnzahlFragen=varFragenBeantwortet;Set(varPopupFertig;true));; //Gives a Popup after all questions been answered
SaveData(colFragenToSave;"SavedFragenkatalog");;SaveData(colErgebnisse;"SavedErgebnisse")
The save-button should be disabled as long as either Dropdown3_1 or toggle "zur Kenntnis genommen" wasn't used.
Puuhh. difficult to describe if you're mothertounge is not english 😄 so sorry for that.
On the Visible property of save button use this code
If(IsBlank(Dropdown_Name),false,true)
On the advance properties of dropdown select "AllowEmptySelection"=true
Also, set the Default value to Blank() for drowdown from advances settings
Remove other codes, no need for collection in this scenario
Hopefully this helps
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473