web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is it possible to pass...
Power Apps
Unanswered

Is it possible to pass a SharePoint Datasource as variable to another screen?

(0) ShareShare
ReportReport
Posted on by 51

Hi,

 

I've been trying to create a template screen to edit a single column from several SharePoint Lists. What I do is that I pass the source to the screen, but in Patch I'm getting an error indicating that the first argument should be a Collection, when I pass the variable it becomes a Table, therefore I use ClearCollect to convert it to collection and I'm able to do the "update", however, the value is not sent back to SharePoint.

Any ideas?

 

Thanks!

 

*********UPDATE*********
As a result of several tests and conversations it is not possible to pass datasources as variable. I won't mark any answer as solution so, if an admin will do that it's OK.

Categories:
  • VDS_Mantra Profile Picture
    175 on at

    can you share the snapshot of your data set and the function you are using ?

     

  • Eliel Aguilera Profile Picture
    51 on at

    Hi @VDS_Mantra,

    The function is:
    ClearCollect(colSPOList,varSource);
    Patch(colSPOList,LookUp(colSPOList,ID=Item.ID),{Title: txtTitle.Text});
    The result is

    EAguilera_0-1599053813630.png

    Note the "TEST" at the end of the title. But SharePoint list is still showing the string without "TEST" appended.

  • VDS_Mantra Profile Picture
    175 on at

    Your code seems correct, but i m still unable to understand ur exact issue.

     

  • Eliel Aguilera Profile Picture
    51 on at

    @VDS_Mantra  the problem is that the updated data is not applied in the data source (SharePoint list), it still show Title instead of TitleTest

  • VDS_Mantra Profile Picture
    175 on at

    Hi, 

     

    Its working there is some other issue in your text. It is updating if i am doing the same at my system. 

     

    Patch(Just_Testing,LookUp(Just_Testing,ID=1),{Title:TextInput1.Text})

     

    SP.JPG

     

  • Eliel Aguilera Profile Picture
    51 on at

    @VDS_Mantra but you're updating the datasource directly and not as a referenced variable.

  • rsaikrishna Profile Picture
    3,703 on at

    @EAguilera 

     

    You should patch the data source SharePoint list directly and after the patch, you can do ClearCollect(yourcollection, SharePointList). 

     

    Patching your collect will not commit the data into data source.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
  • Eliel Aguilera Profile Picture
    51 on at

    The answer to the question is NO!. As I tried several ways to pass the datasource as variable it is not possible unless you use a direct approach, it means, using Switch or If to get Patch over the appropriate datasource.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard