Hi,
I have a gallery that loads its values from a collection to patch into a choice column in sharepoint, i would like if the user does not select a button in that gallery then the patch function is to send Null or Blank, it currently sends the first item in the collection
My on start syntax is
ClearCollect( PitList, {PitButt: "LM1", IsClicked:false}, {PitButt: "LM2", IsClicked:false}, {PitButt: "LM3", IsClicked:false}, {PitButt: "SR1", IsClicked:false}, {PitButt: "SR2", IsClicked:false}, {PitButt: "SRE", IsClicked:false} ); Set(CurrentPitButt, Blank());
My buttons on select is
If( CurrentPitButt = ThisItem.PitButt || CurrentPitButt = Blank(), Set(CurrentPitButt, ThisItem.PitButt);Patch(PitList, ThisItem, {IsClicked: !ThisItem.IsClicked}), Set(CurrentPitButt, ThisItem.PitButt);UpdateIf(PitList, true, {IsClicked:false});Patch(PitList, ThisItem, {IsClicked: !ThisItem.IsClicked}) )
Any help would be appreciated.
Thankyou 🙂
Solved! Go to Solution.
Ignore i just mark the default as, Duh..
{PitButt: "", IsClicked:false}
Hi @shaneOZ
Could you please share more details of your SP list
PitButt is the choice column type in your SP list?You want to patch the value from the gallery if you select to SP list?
And could you please share more details of your gallery?
In the gallery there buttons or what?
Best Regards.
Yumia
@v-yuxima-msft wrote:Hi @shaneOZ
Could you please share more details of your SP list
PitButt is the choice column type in your SP list?You want to patch the value from the gallery if you select to SP list?
And could you please share more details of your gallery?
In the gallery there buttons or what?
Best Regards.
Yumia
Sorry for the late reply,
The project was put on hold and i was off playing with powerBi however i now need to solve this one,
PitButt is just the collection name, the column it references in sharepoint is simply called Pit it is a choice column and is patched via the following code,
If(Connection.Connected ,Patch('Haulage Log', Defaults('Haulage Log'), { Pit: {Value: PitGallery.Selected.PitButt} } ) ,Collect(HAULAGECOLLECTION, { Asset: Can_Assetid.Selected, Pit: {Value: PitGallery.Selected.PitButt} } ) )
it patches succesfully. However if the user doesnt select the pit (which happens) it sends the first value "LM1" in the collection and i would like it too send nothing if unselected.
@Anonymous wrote:Hi @shaneOZ how are you progressing with this?
@Anonymous
Sorry for the late reply and thankyou for your interest, see above
I should also say ive tried using the
ClearCollect( PitList, {PitButt: "", IsClicked:false}, {PitButt: "LM1", IsClicked:false}, {PitButt: "LM2", IsClicked:false}, {PitButt: "LM3", IsClicked:false}, {PitButt: "SR1", IsClicked:false}, {PitButt: "SR2", IsClicked:false}, {PitButt: "SRE", IsClicked:false} ); Set(CurrentPitButt, Blank());
However i do not want to have a empty button in the app, can i hide the button somehow?
Ignore i just mark the default as, Duh..
{PitButt: "", IsClicked:false}
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
198 | |
171 | |
61 | |
33 | |
32 |
User | Count |
---|---|
334 | |
271 | |
104 | |
71 | |
56 |