cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Memorable Member
Memorable Member

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



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.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
Memorable Member
Memorable Member

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



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.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
Memorable Member
Memorable Member

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 🙂

 

Kind regards

 

 

Tom



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.

Highlighted
Memorable Member
Memorable Member

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

 



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.

Highlighted
Memorable Member
Memorable Member

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



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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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