I need some help with the below code. I have two tables with excel as data source.
Data source1 ->Task_List
Data source2 ->Del_Tasks
Whenever a task is deleted from the "Task_List" it should be save first to "Del_Task" and then delete from the "Task_List". I tried to write below code it working sometimes and again it is showing errors later. I am not sure what is the issue, below are the errors:
For all the column names there is an error like formula uses scope and not supported presently..... and
Patch is showing __PowerAppsId__ as an error if I try to delete even with above formula scope error.
Patch(Del_Tasks,
Defaults(Del_Tasks),{S_x002e_No_x002e_:ThisItem.'S.No.'},
{Area:ThisItem.Area},
{Population:ThisItem.Population},
{Houses:ThisItem.Houses},
{Language:ThisItem.Language},
{Due_Date:ThisItem.Due_Date},
{'Alive Task':ThisItem.'Alive Task'},
{Owner_Mail:ThisItem.Owner_Mail}
)
Remove(Task_List,ThisItem);
From current Task_List the item is getting removed but the data is not getting patched to the Del_Tasks table. I have few other columns as well in the Task_List but I would like to patch only the above columns to Del_Tasks table.
Could some one please help ??? I am reposting the message since the last post is went into spam. Please help I am waiting for a while towards the solution.
@Drrickryp, @iAm_ManCat @Pstork1 ???
Thanks in advance
Solved! Go to Solution.
Its Working if I replace for ex:- ThisItem.'Area' with its Label.Text :-->
{'Area': AreaLabel.Text} -> I used Area as Label input inside Gallery.
In a similar way it is defined for other columns also.
Hi @RMeena_9 , please try this
Patch(Del_Tasks,
Defaults(Del_Tasks),{S_x002e_No_x002e_:ThisItem.'S.No.',
Area:ThisItem.Area,
Population:ThisItem.Population,
Houses:ThisItem.Houses,
Language:ThisItem.Language,
Due_Date:ThisItem.Due_Date,
'Alive Task':ThisItem.'Alive Task',
Owner_Mail:ThisItem.Owner_Mail}
);
Remove(Task_List,ThisItem)
Please accept as a solution if it works for you
Its Working if I replace for ex:- ThisItem.'Area' with its Label.Text :-->
{'Area': AreaLabel.Text} -> I used Area as Label input inside Gallery.
In a similar way it is defined for other columns also.
Then kindly replace them all with the appropriate controls. Glad to know you did it work. Kindly accept as a solution to close the thread.