Content courtesy 'About 365' -
I am trying to build a chat component in a Canvas App.
"When you are using a PowerApps form on your SharePoint list, you can skip this step. But if you’re using a lossless canvas app, you need to make sure your PowerApp knows which item has to be pulled from SharePoint. You can do this by using a parameter.
Parameters can be used to pass values from the URL to your PowerApp by putting ?= at the end of the Web link of your PowerApp: https://web.powerapps.com/apps/12a34b5c-678d-90e1-f23g-456h78901hij?itemID=1 In your PowerApp, you can pick up this parameter by using the Param() function and setting it to a global variable using the Set() function in your OnStart event:
When I use the below (as a test) I get one (presumably the first) item to the Collection from the SP ChatLog list -
Set(
itemID,
Param("itemID"));
"1");
If(
!IsBlank(
LookUp(ChatLog,
ID = Value(itemID),
ChatEntries)),
ClearCollect(ChatLogCollection,
Split(LookUp(ChatLog,
ID = Value(itemID),
ChatEntries
), Char(10))));
When I use the below I don't get any items to my Collection from the SP ChatLog list -
Set(
itemID,
Param("itemID"));
If(
!IsBlank(
LookUp(ChatLog,
ID = Value(itemID),
ChatEntries)),
ClearCollect(ChatLogCollection,
Split(LookUp(ChatLog,
ID = Value(itemID),
ChatEntries
), Char(10))));
I am unsure where and how to introduce the site link referenced below.
Parameters can be used to pass values from the URL to your PowerApp by putting ?= at the end of the Web link of your PowerApp: https://web.powerapps.com/apps/12a34b5c-678d-90e1-f23g-456h78901hij?itemID=1 In your PowerApp, you can pick up this parameter by using the Param() function

