cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Get a value by comparing other filled in fields from a datasource

Hey guys

 

 

I think someone posted a simular question like this but I'm not sure.

 

So I'm working on some different kind of ways to make a lunch app and here is were I'm stuck.

I want to get a price value but the price depends on some other filled in fields like Size, Variety and eventually also on the description of a Sandwich.

Could this be achieved with a Collection on the OnVisible of the screen and then search the price in the same screen for those particular filled in values?

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Get a value by comparing other filled in fields from a datasource

Hi Tom_Slosse,

 

According to your description, I create an app by following ways:
1. Set the OnVisible property of a Screen as:

ClearCollect(test,{Price:10,size:100,variety:"variety1"},{Price:20,size:200,variety:"variety2"})
2. Add a Text input control and a Text box control
3. Set the Text property of the Text box control as:

LookUp(test,size=Value(TextInput2.Text),Price)&LookUp(test,variety=TextInput2.Text,Price)
4. Then when I enter the size or the variety in the Text input control, the corresponding price will be shown on the Text box control.

3.PNG

 

Hope this could be a reference for you. Please feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User
Super User

Re: Get a value by comparing other filled in fields from a datasource

Hey all

 

 

I found a solution to my problem to get the price from other filled in fields.

First off I removed the collection because I didn't need it in the end.

And I fixed the problem with the help off @v-yamao-msft her previous post with LookUp() function.

So thank you for giving me that insight

 

So what I did was this:

LookUp(<data_source>, <SPColumn>= <field>.Text [&& <otherColumnsThatNeedToBeComparedToGetTheResult = <field>.Text], <ResultColumn>)

Hope this helps some others as well.

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





4 REPLIES 4
Community Support Team
Community Support Team

Re: Get a value by comparing other filled in fields from a datasource

Hi Tom_Slosse,

 

According to your description, I create an app by following ways:
1. Set the OnVisible property of a Screen as:

ClearCollect(test,{Price:10,size:100,variety:"variety1"},{Price:20,size:200,variety:"variety2"})
2. Add a Text input control and a Text box control
3. Set the Text property of the Text box control as:

LookUp(test,size=Value(TextInput2.Text),Price)&LookUp(test,variety=TextInput2.Text,Price)
4. Then when I enter the size or the variety in the Text input control, the corresponding price will be shown on the Text box control.

3.PNG

 

Hope this could be a reference for you. Please feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Get a value by comparing other filled in fields from a datasource

Hey @v-yamao-msft

 

 

Thanks for your response, I think I can get my head around this a bit more.

I'll let you know if it works Smiley Happy

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Super User
Super User

Re: Get a value by comparing other filled in fields from a datasource

Hey @v-yamao-msft

 

 

It works with a static price indeed thanks for making this clear.

But now I still didn't get the price out of my SharePoint list that matches the description, Variety and Size.

Because price is a table value and it seems that I cant convert it to a Text value.

 

The pictures below show a working version:

Onvis_Prijs.PNGText_prijs.PNG

 

These pictures below is what I need to achieve and let it work:

Onvis_prijs_nonstatic.PNG

Text_prijs_nonstatic2.PNG

Any idea how to do this?

 

Also I want to say thank you for your effort and make some things clear so far!

 

Kind regards 

 

 

Tom

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Highlighted
Super User
Super User

Re: Get a value by comparing other filled in fields from a datasource

Hey all

 

 

I found a solution to my problem to get the price from other filled in fields.

First off I removed the collection because I didn't need it in the end.

And I fixed the problem with the help off @v-yamao-msft her previous post with LookUp() function.

So thank you for giving me that insight

 

So what I did was this:

LookUp(<data_source>, <SPColumn>= <field>.Text [&& <otherColumnsThatNeedToBeComparedToGetTheResult = <field>.Text], <ResultColumn>)

Hope this helps some others as well.

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 144 members 4,110 guests
Please welcome our newest community members: