cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IMathur
Helper IV
Helper IV

using 2 different SharePoint lists as data source for my 2 different screens and shifting an item from 1 to another

Hello Experts!

I have been working on creating a PowerApps Application for project management capabilities. I am using 2 different SharePoint lists as data source for my 2 different screens, but the columns names in these 2 lists are same. Like one list is for ‘Completed Projects’ and second is for ‘Ongoing Projects’. I have one column name as ‘Project Status’. Now I want to know if it is possible if I edit the screen/form of ongoing projects in the app and change my Project Status from ‘Active’ to ‘Completed’ and with this status change my that particular entry in ‘Ongoing Projects’ List gets shifted/moved to ‘Completed Projects’ List. Any help and ideas are very much appreciated.

15 REPLIES 15
eka24
Super User III
Super User III

Can you give a screen shot of the form

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Yes. Please find below the screenshot.

IMathur_0-1594372330037.png

 

eka24
Super User III
Super User III

Try OnSelect of a button:

Patch( Datasource, First( Filter( Datasource, ProductName = ProductNameTextBox.Text) ), { Status: "Completed" } )

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi,

 Let me show you want i want to achieve. Below is the home screen of the app.

IMathur_0-1594375051392.png

Under Current Projects, i create an entry as below

IMathur_1-1594377633892.png

then i submit , then in Current Projects, this is how it looks as below- [this gallery is linked to a sharepoint list name 'current']

IMathur_2-1594377761105.png

Now what i want here is, if i Update the status to Completed in edit form , i want my this project 'ABC' to be shifted to another sharepoint list named 'Completed' and to be now shown in below gallery:

IMathur_3-1594378128769.png

 

 

 

 

Hi @IMathur ,

Assuming that all the fields in your 'Completed' list are the same names and types as the ones in your form, this would work if run from a control inside the form. Note if outside the form, ThisItem would need a different reference. Note yo may have to change some list and field names in the below as I assumed them from your post.

If(
   ThisItem.Status="Completed",
   ClearCollect(colItem,ThisItem);
   Collect(Completed, colItem);
   RemoveIf('Current Projects',ThisItem)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @IMathur ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Not really, My submit button is outside the form, and i am neither able to patch the item on the basis of filter  in Completed Projects and nor remove it from the Current/Ongoing Projects

Hi @IMathur 

Unless I am missing something, you are making this more complicated than it needs to be.  Since all the columns are the same, why not have just one list and a column for defining the status of the project as either Completed, Active, Tabled, etc.  You could use one screen with a Radio button to control the items in a gallery according to the status as a filter. 

Hi @Drrickryp  ,  I want a separate gallery for Current Projects and Completed Projects. If I combine the list how will i show them in the different galleries.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (81,156)