@hnguy71
Your formula for adding columns will do the trick. However, in your formula, your're adding the column but not doing anything with it.
AddColumns returns a table with the added column, it does not modify the exiting table that you supply it.
So, consider the following formula instead:
ClearCollect(CurrentUser,User());
ClearCollect(
UserList,
BSN_FAL_UserList
);
ClearCollect(
SP_List,
BSN_FAL_PowerApps
);
ClearCollect(mergedList,
AddColumns(
SP_List,
"New Column",
LookUp(
UserList,
u_Key = m_Key
).Reviewer
)
)
This will add the "New Column" to the table of SP_List and will then return that as a new table. In this case we are collecting it into a mergedList collection.
Also, typically you would use a Set to a variable for the User() rather than a collect. A collection is rows of records. The User() function returns just a record, so no need to turn it into a table. So, instead use Set(CurrentUser, User())
Also you might want to consider (unless you have a specific reason for having them) skipping the first two collections. Your formula would look like this:
Set(CurrentUser,User());
ClearCollect(mergedList,
AddColumns( BSN_FAL_PowerApps,
"New Column", LookUp(BSN_FAL_UserList, u_Key = m_Key ).Reviewer)
)
NOW...one more thing....
If you actually want more from the UserList in your added columns, you could either put more "new columns" in and more lookup statements to the UserList, but, if you have a need for the entire record or a subset of it, you can specify it all in the formula:
Set(CurrentUser,User());
ClearCollect(mergedList,
AddColumns( BSN_FAL_PowerApps,
"UserRecord", LookUp(BSN_FAL_UserList, u_Key = m_Key )
)
)
In this example, the mergedList.UserRecord would be the entire looked up record. So, you can access any information in it. For example First(mergedList).UserRecord.Reviewer would give you the reviewer information of the first record and First(mergedList).UserRecord.Hub would give you the Hub field information for the first record. etc...
I hope this is clear and helpful for you.