cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RMeena_9
Resolver I
Resolver I

Patch deleted record from one data source to other data source

 
Hello Guys,

 

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. 

RMeena_9_0-1656413449649.png

 

RMeena_9_1-1656413449613.png

 

 

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 

View solution in original post

4 REPLIES 4
Silvester
Super User
Super User

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 

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the thread and so other members of the community can find it easily.

Hello @Silvester,

 

No its not working. It is showing same issue.

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.

 

Silvester
Super User
Super User

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. 

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the thread and so other members of the community can find it easily.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,208)