Hello, I have been a software developer for 20 years but I am brand new to PowerApps.
I have a Sharepoint Online list with a Lookup column in it that gets data from another Sharepoint list. I have no problems with the list or lookup column when using Sharepoint Online.
But, PowerApps does not populate the dropdown field the first time the screen is accessed, it is blank, the other fields (Textboxes) are populated as expected. I have to manually click the dropdown to get the lookup data to populate, then the dropdown functions as expected for each record (the lookup value is in the dropdown).
I can put a Label on the datacard and it populates every time with the list data, but the dropdown is blank (on the first record). The dropdown requires a manual click to open the connection to Sharepoint Online the first time the Edit screen is accessed.
What am I doing wrong?
Is there a way to force the dropdown to get the Sharepoint lookup data before the dropdown populates so that the dropdown will have the lookup data the first time I access the Edit screen?
Thanks in advance for your help.
--Chris
Solved! Go to Solution.
My suggestion is to use the OnVisible property of your screen (or a button click) to load the Sharepoint list into a collection using Distinct.
For example:
I have collection DropCollect gather all my Quote Numbers into it using:
ClearCollect(DropCollect,Distinct(QuoteNumberMerged,QuoteNumber))
Then in my dropdown I use "Drop Collect" as my items property.
And last I have my Default property set to the last item in the list with:
Last(DropCollect).Result
This means when my screen loads I get the full list of distinct values into my dropdown and the last value in that list is loaded.
Hi @Anonymous
May you re-check if you set your Dropdown.Items = Distinct(Table, Field) correctly?
Once it is written with Distince, definteily it will populate as the as the Table from SPL is connected.
Then, use either Filter (for table) or LookUp(for single data) to filter table based on the dropdown.
Hope this helps.
TQ
My suggestion is to use the OnVisible property of your screen (or a button click) to load the Sharepoint list into a collection using Distinct.
For example:
I have collection DropCollect gather all my Quote Numbers into it using:
ClearCollect(DropCollect,Distinct(QuoteNumberMerged,QuoteNumber))
Then in my dropdown I use "Drop Collect" as my items property.
And last I have my Default property set to the last item in the list with:
Last(DropCollect).Result
This means when my screen loads I get the full list of distinct values into my dropdown and the last value in that list is loaded.
Hi ChrisInTexas
I have the same problem as you describe, i.e. the dropdown requires a manual click to open the connection to Sharepoint Online the first time the Edit screen is accessed.
Could you write a few words about what you did to make this work properly.
Thanks to JRaasumaa I used a collection for the items.
There is no latency now, works perfectly.
--Chris
Nice solution, but unfortunately, this doesn't work when using a form and datacards for the entries, as they are not loaded until you click on the field. Only then the entries are calculated and the system is able to choose the default one. At least this is what I observed
Hi,
In my screnario,
I need to get values into the dropdown from a swagger custom connetion.
Is there any way to get values from swagger into a dropdown.
i tried to get user infromation using custom connection, but here i'm trying to get more than 10 values into a dropdown using a custom swagger connection.
Please let e know if anyone have tried this.
Thanks in advance
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |