cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MShelnutt
Helper V
Helper V

DataCardValue1 needs to pull data from another SharePoint source column

I have a PowerApp form (called RMA) that has a field (called CC#) that I need to automatically pull a number from a different SharePoint list (Customer Complaint) than the data source for the form (RMA List).  The data is an automatic number generated for every entry in the SharePoint list (Customer Complaints), so the first entry is 1, the second is 2, etc.. 

How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@MShelnutt 

So looking back over the prior thread, in that one we put a formula in the OnSuccess action of the form to determine if we needed to launch, so in that formula:

    Launch("URLForOtherApp&ID=" & Text(Form1.LastSubmit.ID))

 

This will pass the ID to the next app in the URL.

Then in the RMA app, first look at the Param and navigate as needed.

 

For example, in the OnStart of the RMA app:

 

If(Value(Param("ID") > 0, Navigate(theRMAFormScreen))

 

Then in the CC# Default property of the Input Control in the datacard:

Coalesce(Text(Parent.Default), Param("ID"))

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

17 REPLIES 17
gabibalaban
Dual Super User
Dual Super User

Hi @MShelnutt ,

First of all create a connection inside your form to the second list and set the DataCardValue1 Default property to extract the desired number using LookUp() function. I guess there is a logic behind how number to be extracted.  Please give us more details. 

@gabibalaban @RandyHayes Forgive the lengthy response, but I think it will help.  I have a PowerApp that is used to log a Customer Complaint into a SharePoint list.  There is one field in the form that depending on which choice the user chooses, determines what happens when they click "Submit".  One option is the form submits and then resets- done.  The other will submit the form and then launch a different PowerApp form that logs into a different SharePoint list.  The first SharePoint list automatically generates an ID# that is essentially a counter for each entry made.  I would like the second PowerApp form to automatically pull that ID# from the first entry and log it into the second SharePoint list providing a linking reference.

MShelnutt_0-1610036354980.png

 

 

 

Hope this helps.

RandyHayes
Super User
Super User

@MShelnutt 

What is the connection/relationship between the RMA CC# and this Atlanta Customer Complaints?

You can certainly get the last ID number from the list, but I am confused as to what would connect the item you are editing to that particular list.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes All RMA reports come from a Customer Complaint, but not all Customer Complaints will result in a RMA.  If someone is looking at the data in the Customer Complaint SharePoint list, if the entry has Yes for the Warranty column, they will know there is a corresponding RMA.  I want it so if someone goes to the RMA SharePoint list, they will see what Customer Complaint it is tied to.  FYI- CC# means Customer Complaint #.

Hope this helps.

RandyHayes
Super User
Super User

@MShelnutt 
Sort of kind of following, but still a little lost...

Here's some of my confusion:

- you mention Customer Complaint and Customer Complaints - are these two different lists, or a typo?

- the Atlanta Customer Complaints list you showed has two columns - are there more?

- You mention the RMA list...

 

Let me explain what I know (based on the bit of confusion I have above):

- You have a Form called RMA and its datasource is RMA

- There is a Warranty column in Customer Complaint.  If it is Yes, then there is an RMA entry in the RMA list.

 

Here is where I kind of go off of the rails...

What ties the RMA to the Customer Complaint?  Is there a column in RMA or Customer Complaint that would serve to do this?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes I apologize, yes it was a typo.  Here is what the columns look like in the Customer Complaint List-

MShelnutt_0-1610044084950.png

And here is the columns for the RMA list-

 

MShelnutt_1-1610044141226.png

 

Does this help?

 

-Michael

RandyHayes
Super User
Super User

@MShelnutt 

Immensely!!  Thanks.

 

So, the RMA list has a CC# column in it and it is numeric.  Is that column populate with the ID of the record in the Customer Complaint list?

Is that what relates the RMA back to the CC List? 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes  Yes, exactly.  I added that column for that reason.  Now I need to know how to get the PowerApp to pull it then write it.

RandyHayes
Super User
Super User

@MShelnutt 

Okay...we've found the connection (crowd cheering).

But I am confused by your last statement "how to get the PowerApp to pull it then write it."  Can you explain that?

I assumed that when you first create the RMA record that you are populating that CC# column with the ID of the CClist record...is that not the case (I hope not as that would lose our connection - crowd moans)?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,004)