I am trying to create a dropdown list where the dataverse table source changes based on the users selection in another dropdown list. In this case the user will select either line 1, 2 or 3. Depending on this selection the dropdown list for bulk or blanket changes. The problem I am having is rather than giving me the choices from the dataverse choice column. Instead, it just says [object Object]. I get the choice column options when I remove the switch statement.
There were 2 parts to resolving this problem. In the OnVisible for the screen I generated this collection:
ClearCollect(
lineOptions,
Table(
{
Line: "",
BulkorBlanket: [""],
Options: [""]
},
{
Line: "1",
BulkorBlanket: Choices([@'Line 1 Reference Values'].'Blanket or Bulk'),
Options: ShowColumns('Line 1 Reference Values',"cr999_blanketorbulk","cr999_product")
},
{
Line: "2",
BulkorBlanket: Choices([@'Line 2 Reference Values'].'Blanket or Bulk'),
Options: ShowColumns('Line 2 Reference Values',"cr999_blanketorbulk","cr999_product")
}
)
)
Within the Bulk or Blank Dropdown the items were populated based on the selection of the Process Line Drop Down by doing this:
LookUp(
lineOptions,
Line = Dropdown_LineSelection_LOD.SelectedText.Value
).BulkorBlanket
From what I can tell the Ungroup function in your code was the potential solution. Unfortunately, that did not work. The output to the list still remains [object Object]
you can take help of this code -
//Create a collection
ClearCollect(
myTable47,
{NickName: "Redwood", People: 10, Building: "Building A"},
{NickName: "Oak", People: 25, Building: "Building A"},
{NickName: "Pinetree", People: 8, Building: "Building B"},
{NickName: "Cedar", People: 15, Building: "Building B"}
);
ClearCollect(myMeetingRooms47,
{info:"This is a list of meeting rooms",value: myTable47});
//Get a table stored in a cell code
ClearCollect(mySolution47,Ungroup(myMeetingRooms47,"value"));
by Matthew Devaney
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others.
Thanks & Regards,
Ravindra Jadhav
Independent Consultant | Freelancer
+91-9146152149
Connect Me On Different Platforms