I have two questions about collections.
1)What is the correct syntax on creating a collection from more than one field in an entity. I have three fields I want to add ot my collection.
CableNumber, CableFrom, FromDescription.
I'm getting it wrong
What I've been doing is this format:
(ClearCollect(CableFrom,('Cable From'.CableNum),('Cable From'.CableFrom),('Cable From'.FromDescription)))
and so the first value, CableNum gets populated. But the other two fields don't.
I'm guessing it's because I created this collection incorrectly
2) How would one create a collection as a subset of another collection, using my above example how would i say something like CreateCollection(CableNumber, CableFrom, FromDescription.) where CableNumber=1
3) How would be the best way to find a specific record in a collection and populate a label with the value found in that record/field?
thanks for all your help so far.
1) and 2):
ClearCollect(NewCollection,ShowColumns(Filter(OriginalCollection, CableNumber = 1),"CableNum","CableFrom","FromDescription")
Label.Property(Default or something) = LookUp(Collection, field = value, ReturnColumn)
Hopefully this helps.
Thanks for your help.
You say your solution is the same for 1) and 2) but I have to create my first collection
ClearCollect(TestOnly,('Cable From'.CableNum),('Cable From'.CableFrom),('Cable From'.FromDescription));
where Collection=TestOnly, and the entity='Cable From' with these three fields
So this collection is created but for some reason only the 'FromDescription' field is populated, though on confirmation there is data in all three fields.
I'm hoping it's in the design of the testonly collection where this is occuring.
FOLLOW UP : Tried the same thing with a different collection, different entity and 3 fields from that entity - I see the same behavior. So maybe I'm developing multi field collections using the wrong syntax?
So let's check this again,
you want to have your TestOnly colleciton filled with one specific record from the entity "Cable From"?
This specific record only returns three specific fields?
I'm trying to understand of we're on the same page or not
Thanks for responding. I think I've figured it out. regarding my last entry,i kept thinking why was i missing data when creating a collection because it wouldonly show just dat from one fielld. When I hooked it into the form, i was able get the lookup's to work. Thanks very much for your help. My love/hate relationship with powerapps continues (more love).
I think i'm hitting inconsistencies and due to my ramping up in powerApp, I run into inconsistencies.
This is a sample of the data I'm working with. I created a Collection from it,
I checked the collection for data and each field shows values
I then created a form, and wanted to show data depending on which Device was chosen. Depending on device, show result in description and Device Type
my trouble is that I cannot get the description and devicetype to show any values.
In populating the description as an example, i tried the following 2 code snippets.
NOTE: source_DT is the field to the right of the Device Search in Red, gettng data from the drop down -
1) Text = LookUp('Deviced', Device=Source_DT.Text, DeviceDescription
2) Text = LookUp(Deviced, Source_DT.Text in Device, DeviceDescription)
Nothing is appearing in Description.
So my question is what am I doing wrong?
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.