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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,480)