Hi there
I have a dropdown that is outside of my gallery. The gallery edits and saves vehicle registration data to a SharePoint Library. The problem is that when I press the Save button my dropdown value resets. I want to keep the selection. Any suggestions? Thanks
Solved! Go to Solution.
Yep...as suspected, you're changing the record source for the dropdown. No worries though.
So I looked back over my replies and noticed that I was looking at your image and gave some formula examples, they were for the wrong one. Let's roll back to an earlier post:
Change the formula on the OnChange action to the following:
Set(MySelection1, Self.Selected.PNumber)
Then change your Default property of the Dropdown to:
MySelection1
Remove the formula on the OnSelect action.
THAT should resolve it!
A couple of questions:
1) Is this a Dropdown control or a ComboBox?
2) The Items property of the control is obviously the same as the datasource of the EditForm. What is the Items property?
Hi Randy
1) This is a dropdown
2) Forgive me if I'm not answering your question. I think what you're asking is what I have in the gallery items. If this is the case I have: Filter(ListVeh2,PNumber = ChooseVehicle.Selected.PNumber).
Actually, it is the Items property of your Dropdown that I was interested in.
I am just now realizing that you actually have your entry "form" in a Gallery. Curiously any particular reason for that? Does the filter for that Gallery return multiple items that can be edited?
Thanks for your assistance
Okay, see below the information for my dropdown.
The only reason I have my entry form in a gallery is because it was the the only way I could get my app to do what I needed it to do. My app is connected to two SharePoint lists. The first collects all registration details(this is the screen you see) and the second records vehicle pre-start checks. The only fields that can be edited are the ones you can see.
FYI
How my app works at the moment.
1)The dropdown as shown on my first image selects the vehicle to be inspected. On the same screen you can see/edit the registration details. Once you save this it goes to a SharePoint List and a new screen opens.
2)On the next screen I have a label that mirrors the dropdown from the previous screen(because it will be for the same vehicle). This is where the pre-start checklist is completed. Once the user saves this, it goes to a separate SharePoint list. My Vehicle number is the value that ties it all together.
Thanks for the detail - always welcome!!
So, let's first change your OnSelect property of the ChooseVehicle dropdown control to:
Set(MySelection1, Self.Selected.PNumber)
Then change your Default property of the Dropdown to:
MySelection1
Let's see where that gets you.
Unfortunately it's still doing the same.
So, I've been focused on some of the common scenarios, but reading back to your original post - you mention that all is well until you hit Save - what is the Formula on the save button?
I have a on select and the formula is:
Patch(ListVeh2,ThisItem, {'Wof Expiry':DPCChangeWOFDATE.SelectedDate},{'Registration Expiry':DPCChangeRegistrationDATE.SelectedDate},{'COF Expiry':DPCChangeCOFDATE.SelectedDate});UpdateContext({EditThis: false})
Not sure if it makes any difference but the cancel/edit button has a toggle and this makes the save button and the date input fields disappear. See photo below when it's activated. Probably not important, but thought I'd mention it anyway.
Yep...as suspected, you're changing the record source for the dropdown. No worries though.
So I looked back over my replies and noticed that I was looking at your image and gave some formula examples, they were for the wrong one. Let's roll back to an earlier post:
Change the formula on the OnChange action to the following:
Set(MySelection1, Self.Selected.PNumber)
Then change your Default property of the Dropdown to:
MySelection1
Remove the formula on the OnSelect action.
THAT should resolve it!
User | Count |
---|---|
256 | |
108 | |
97 | |
51 | |
39 |