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

Re: CDS Opportunity Can't Access Price list Field.

Can you please try the exact same thing as in my document? I have used the same entities in that example so really shouldn't have to change anything.

Have a gallery of opportunities (name in my case BrowseGallery1) on screen 2 with following items property

Filter(Opportunities, Opportunity = [@ModelDrivenFormIntegration].Item.Opportunity)

Then have a gallery in your 1st screen with the following items property:

Filter('Price Lists', 'Price List' = First(BrowseGallery1.AllItems).'Price List'.'Price List')

That's really all you need. In this items property on the right side, this is what the 2 'Price List' expressions do. First one gets the price list records tied to the opportunity, and the second one gets their GUIDs. The Filter funtion them matches those GUIDs with the list of all price lists and fetches the right ones.

Please try once with the exact formula I have shared and let me know in case of any questions.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)

Jonfarmer4999
Level: Powered On

Re: CDS Opportunity Can't Access Price list Field.

Ok given that, how do I move to a collection that contains the Products in the Price List which can then populate a drop down?

 

 

Super User
Super User

Re: CDS Opportunity Can't Access Price list Field.

Did mybrepliea above solve your problem of being able to fetch the price lists? If so, please accept it as a solution so someone searching for a similar issue can find the solution easily.

Coming to your next question, do you want to populate all the products in the Price List (all of the price lists in the selected opportunity?) in a dropdown?
Jonfarmer4999
Level: Powered On

Re: CDS Opportunity Can't Access Price list Field.

I need what ever price list is set on the opportunity to populate the products in the dropdown

Super User
Super User

Re: CDS Opportunity Can't Access Price list Field.

@Jonfarmer4999 would suggest/request you mark my reply with the document as the solution to the original question as it will make it possible for someone to search the answer to the original question easily.

Coming back to your 2nd question, I can either reply here or on a new post.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)
Super User
Super User

Re: CDS Opportunity Can't Access Price list Field.

You can either populate the dropdown by using this in the Items property of the dropdown: 

 

Filter(Products, 'Default Price List'.'Price List' = First(BrowseGallery2.AllItems).'Price List'))

 

Or if you want to first populate in a collection, then you can use this (may be on the OnSelect property of a button): 

 

ClearCollect(ProductCollection, Filter(Products, 'Default Price List'.'Price List' = First(BrowseGallery2.AllItems).'Price List'))

 

And then you can set the Items property of the dropdown to: ProductCollection. 

 

If both of your questions are resolved now, please mark this and the other reply with the word document with "Accept as Solution" and give Kudos. Not closing out the thread will not anyone looking in the forum for a similar issue. 

 

Thanks,

Hardit (Haman)

Jonfarmer4999
Level: Powered On

Re: CDS Opportunity Can't Access Price list Field.

Hi

 

In the end I found I was running up against limitations that the unique functionality I wanted required. Primarily the limitation I reached resulted in the "Multiple levels of expansion aren't supported." error. 

 

So I tried a different approach and created a custom entity to hold the information I needed. Created a function app to update the information on a schedule and with in a couple of hours my Power App was working correctly. 

 

Thank you all for you suggestions. 

View solution in original post

Super User
Super User

Re: CDS Opportunity Can't Access Price list Field.

Hi @Jonfarmer4999

I am not sure what limitations you are talking about because I was able to recreate everything you had asked for. Multiple levels of expansions isnt really something that I would expect anyone to hit for the use case you wanted unless the questions you raised here were not in line with what you wanted.

Anyways, congrats. Hopefully people who have similar use cases will read the entire thread and not just your accepted solution.

Thanks,
Hardit

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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