cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jbaggett Helper I
Helper I

Return Cell Value or work around

I posted something similar before, but have decided to try it differently. While I fixed one issue, I created another. 

 

See the picture below.

The Set Up:

I have a Form and a Gallery next to each other. Each time a Supplier sends a price back the user will come to this page and insert the price for this specific UniqueID. When all prices are in, the user will choose the supplier from the gallery. This "Chosen Supplier", is then put into the "Chosen Supplier" Column in the form and uploaded to sharepoint. (On the Form each supplier is a column header in a sharepoint list. On the Gallery, the supplier names are being referenced from a "Supplier List" on a different sharepoint list)

 

The Problem:

I somehow need the Price under the "Chosen Supplier" to be put into a different column called "Chosen Price". I have no idea how to do this. I tried to LookUp UniqueID in sharepoint list-->sortcolumns by chosensupplierinput.text and have that return the value in the cell, but my research has shown that sharepoint does not allow dynamic column names in the filter, search or look up functions. 

 

Any other ideas to on how to go about this would be welcome. I've now spent two days trying different ways to get one price to be uploaded to a column. My last resort is to just have them put in the price again, but that seems redundant. 

 

 

 

Supplier.PNG

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Return Cell Value or work around

Hi @jbaggett 

 

You can update the chosen price column using the below configuration:
 
1) If you are using Edit Forms, then add a field in the form for 'Chosen Price', if you donot want this to be displayed to user, you can set the "Visible" property of the datacard to false.
Now, in the Update Property:
 
If(DataCardValue12.Text = "Supplier1", TextInput1.Text, DataCardValue12.Text = "Supplier2", TextInput2.Text,DataCardValue12.Text = "Supplier3", TextInput3.Text)
 
Here, I am assuming that DataCardValue12 is the name of control that shows chosen supplier in the textbox in the attached screenshot. TextInput1, TextInput2 and TextInput3 corresponds to Supplier1, Supplier2 and Supplier3 respectively.
 
2) If you are using individual controls:
Patch(DataSourceName, LookUp(DataSourceName, ID = "ValuetoMatch"),{'Chosen Price':If(DataCardValue12.Text = "Supplier1", TextInput1.Text, DataCardValue12.Text = "Supplier2", TextInput2.Text,DataCardValue12.Text = "Supplier3", TextInput3.Text) })
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Return Cell Value or work around

Hi @jbaggett 

 

You can update the chosen price column using the below configuration:
 
1) If you are using Edit Forms, then add a field in the form for 'Chosen Price', if you donot want this to be displayed to user, you can set the "Visible" property of the datacard to false.
Now, in the Update Property:
 
If(DataCardValue12.Text = "Supplier1", TextInput1.Text, DataCardValue12.Text = "Supplier2", TextInput2.Text,DataCardValue12.Text = "Supplier3", TextInput3.Text)
 
Here, I am assuming that DataCardValue12 is the name of control that shows chosen supplier in the textbox in the attached screenshot. TextInput1, TextInput2 and TextInput3 corresponds to Supplier1, Supplier2 and Supplier3 respectively.
 
2) If you are using individual controls:
Patch(DataSourceName, LookUp(DataSourceName, ID = "ValuetoMatch"),{'Chosen Price':If(DataCardValue12.Text = "Supplier1", TextInput1.Text, DataCardValue12.Text = "Supplier2", TextInput2.Text,DataCardValue12.Text = "Supplier3", TextInput3.Text) })
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

jbaggett Helper I
Helper I

Re: Return Cell Value or work around

Thank you this does work. I was hoping more for an automated solution that did not need an update when a new supplier was added, but I am ok with this solution. 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,825)