cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AYCHL
Frequent Visitor

Get text values from a table to a collection

I am Currently having an issue trying to get just the values from a table.

 

Collect(TempProgram,
   {ProgramID:
    Filter(PROGRAM, Description in ProgramSelection.SelectedItems.Value).ProgramID,
   Description: Filter(PROGRAM, Description in ProgramSelection.SelectedItems.Value).Description});
Collect(TempModels,
   {ModelID:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).ModelID,
   Broadcast:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).Broadcast,
   Description:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).Description,
   BOMID:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).BOMID,
   ProgramID:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).ProgramID});
Collect(TempSubAssemblies,
   {SUBBOMID:
    Filter(SUBBOM, Desc in SubAssemblySelection.SelectedItems.Value).SubBOMID,
   Desc: Filter(SUBBOM, Desc in SubAssemblySelection.SelectedItems.Value).Desc});
Collect(TempPartNumbers,
   {PID:
    PIDInput.Text,
   PartNumber:
    PartNumberInput.Text,
   ProgramID:
    Filter(PROGRAM, Description in ProgramSelection.SelectedItems.Value).ProgramID,
   ModelID:
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value).ModelID,
   Quantity:
    QuantityInput.Text,
   StatudID:
    1,
   PartDescription:
    PartDescriptionInput.Text})
 
The previous formulas get the data but It is retriving it as a table and I just want the values from those records.
 
Is there any way that I could get just the Text values form those tables instead of the "table"?
1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @AYCHL

 

With regards to the data that you're trying to collect into the 'TempModels' collection, I suspect this is the sort of syntax that you're looking for.

 

 

Collect(TempModels,
        ShowColumns(Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value),
                    "ModelID",
                    "Broadcast",
                    "Description",
                    "BOMID",
                    "ProgramID"
        )
)

 

 

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @AYCHL

 

With regards to the data that you're trying to collect into the 'TempModels' collection, I suspect this is the sort of syntax that you're looking for.

 

 

Collect(TempModels,
        ShowColumns(Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Value),
                    "ModelID",
                    "Broadcast",
                    "Description",
                    "BOMID",
                    "ProgramID"
        )
)

 

 

 

View solution in original post

AYCHL
Frequent Visitor

Great! That greatly helped me out,

Thanks to that I rewrote the formula as this:

 

Collect(
  TempModels,
   ShowColumns(
    Filter(MODELS, Broadcast in ModelSelection.SelectedItems.Broadcast),
  "ModelID","Broadcast","Description","BOMID","ProgramID"));
Collect(
 TempProgram,
  ShowColumns(
   Filter(PROGRAM, Description in ProgramSelection.SelectedItems.Description),"ProgramID","Description"));
   
Collect(
    TempSubAssemblies,
        ShowColumns(
            Filter(SUBBOM, Desc in SubAssemblySelection.SelectedItems.Desc),
            "SubBOMID","Desc"));
   
ForAll(TempModels, Collect(TempPartNumbers,
   {PID:
    PIDInput.Text,
   PartNumber:
    PartNumberInput.Text,
   ProgramID: ProgramID,
   ModelIDs: ModelID,
   Quantity:
    QuantityInput.Text,
   StatudID:
    1,
   PartDescription:
    PartDescriptionInput.Text}))
 
And worked perfectly for what I want to do!

I'm glad that helped you out @AYCHL!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,311)