Get A Value From A Table Stored In A Cell

Input collection: myMeetingRooms48

Infovalue
This is a list of meeting rooms[object Object], [object Object]…

Note: [object Object], [object Object]… refers to a table stored in a cell. This is how PowerApps displays a table as text.


Output collection: myUngrouped48

NickNamePeopleBuilding
Redwood10Building A
Oak25Building A
Pinetree8Building B
Cedar15Building B


Output value: mySolution48a (People in Redwood Room)

10


Solution code:

//Create a collection
ClearCollect(
    myTable48,
    {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(myMeetingRooms48,
{info:"This is a list of meeting rooms",value: myTable48});

ClearCollect(myUngrouped48,Ungroup(myMeetingRooms48,"value"));

//Get value from a table stored in a cell code
Set(mySolution48a,LookUp(Ungroup(myMeetingRooms48,"value"),NickName="Redwood",People));


Output value: mySolution4ba (People in Redwood Room)

Building B


Solution code:

//Create a collection
ClearCollect(
    myTable48,
    {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(myMeetingRooms48,
{info:"This is a list of meeting rooms",value: myTable48});

ClearCollect(myUngrouped48,Ungroup(myMeetingRooms48,"value"));

//Get value from a table stored in a cell code
Set(mySolution48b,LookUp(Ungroup(myMeetingRooms48,"value"),NickName="Pinetree",Building));