Hello
I am currently working on an app with offline capabilities. I have two galleries, one holds the forms that were submitted to the data source SP and the other holds the forms that were saved offline in a collection. I use a patch function to send each individual form to the data source and when I go back to the home page, the form is in both gallerys.
I really want to know how do I remove the Form from the collection when it is successfully submitted to SP? is there something I need to put in the patch? like a clear or do i need to add a condition to the gallery. Please let me know. Thanks
Solved! Go to Solution.
Hi @Anonymous
what is unqiue with respect to the value being added to collection and sharepoint
If for example it is the ID value
then when you patch to sharepoint
do removeif(collection, ID = theidpatched)
or Title = titlevalue patched
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous
after you successfully pacth the data you need to remove the item from the gallery
Use RemoveIf and define the condition to remove the item posted to SharePoint from the gallery
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
it would be removeif(Data souce, ???) not sure what the condition would be
Hi @Anonymous
Can you post a screnshot of your App where you are patching data to collection and SharePoint
Hi @Anonymous
what is unqiue with respect to the value being added to collection and sharepoint
If for example it is the ID value
then when you patch to sharepoint
do removeif(collection, ID = theidpatched)
or Title = titlevalue patched
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I used the title and it seemed to work thanks. However for some reason when i create a form offline it creates two in the collection. Could this be because i do the +1 after my collection? " Collect(MySPCollection,{id: Max(MySPCollection,id)+1 " It creates two forms and when I select one to patch it patches and is removed, however the other form wont transition even though it patches
Hi @Anonymous
No looks like you are only setting the id attribute by adding 1 to it
must be some other reason or may be you are calling collect twice
check your code base again
Glad to know that you were able to remove the item from collection though using RemoveIf
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
221 | |
99 | |
94 | |
55 | |
36 |
User | Count |
---|---|
273 | |
105 | |
104 | |
60 | |
60 |