Hey guys!
I have an app that collects a bunch of info with this code, that repeats itself for every row of data, I have 16 rows of data that are collected:
ClearCollect(Collection1,
{
Category: (Category.Selected.Result),
Base: Base1.Text,
Status: Estatus1.Value,
Ticket: Value(Ticket1.Text),
Comment: Coment1.Text},
And I have this code to patch it to a sharepoint list:
ForAll(Collection1, Patch(Registros, Defaults(Registros),
{Title: Base, Categoria: Category, Estatus: Status, Tickets: Ticket, Comentario: Comment}));
Refresh(Registros);SortByColumns(Registros,"Modified",Ascending);Navigate(Inicio, ScreenTransition.Fade)
My question is if there is a way that the info is patched only if the Ticket does not exist on the sharepoint list, and if it does exist, do not patch that particular row of data.
Another thing that I noticed is that, i might have several records of the same category, for example Category 1 can have 5 records each with different data on the sharepoint list. What I'm trying to do is bring the latest value of that category(database in this case) but it does not bring me the latest value, it brings me the first one. My sharepoint list is sorted by date. Do you guys have an idea how can I resolve this?
This is the code that I'm using:
LookUp('Registros',
NombreBase = Base1.Text,
Tickets)