Hi, I have a jobcard app. When the user fills out the fields and selects the 'add record' button, it saves to a collection (see in step 1). This collection is linked to a gallery, within the gallery, i have a submit button which patches the data to a sharepoint list (see in step 2). I need to be able to mark the entry in the gallery as submitted, once the user has submitted the entry. Is there an automated way i can do this?, it has to be in the app, not the sharepoint list. Any assistance would be much appreciated.
Step 1:
Collect(KBLCollection,{Title:Employee_ED.Selected.Value,PO:PO_ED.Text});
SaveData(KBLCollection, "KBLCollectKeep")
Step 2:
Patch(KBL_App, Defaults(KBL_App, {Title: CollectGallery.Selected.Title,PO: CollectGallery.Selected.PO});
SaveData(KBLCollection, "KBLCollectKeep")
the Onselect of the Submit button is
Patch(KBL_App, Defaults(KBL_App),{Title: CollectGallery.Selected.Title,Date: CollectGallery.Selected.Date});
SaveData(KBLCollection,"KBLCollectKeep")
The Items property of the gallery is
KBLCollection
Are you able to provide the OnSelect of the Submit button as well as the Items property of your gallery?
Thanks Cooper01. I have a label within the gallery ThisItem.IsSubmitted=false
and have this on the 'Submit button' ThisItem.IsSubmitted=true; If(ThisItem.IsSubmitted = true, Green,Red);
When i add a record to the gallery, the label reads false, but when i click the submit button, there is no change, still false
Each item in your gallery would need the IsSubmitted column. Since you are showing items that are not submitted, it may make more sense to initialize the IsSubmitted to false. Then only when you perform your submit action, set IsSubmitted to true. Then in the gallery you should be able to conditionally style your button in ThisItem.IsSubmitted
Hi Cooper, thanks for getting back to me. Once i add it to the collection, it goes here to the gallery. I only want it to show as submitted, once they have Submitted the entry from the gallery. (example, if i submit test2, i need something in the gallery saying or showing submitted. I tried putting a variable on the button fill, but it changes all the buttons
You could add an additional column to your collection and then use that in the gallery
Collect(KBLCollection,{Title:Employee_ED.Selected.Value,PO:PO_ED.Text,IsSubmitted:true});
The new IsSubmitted column could be displayed in the gallery after the item is saved.
Sounds like you may not need to store this value on the SharePoint list, but if you do you could add a new column