Hi,
I have a collection called ColData as below:
CompanyName |
Apple |
Sony |
I have a sql table CompanyData as below:
Id | CompanyName | CompanyLocation |
1 | Apple | California |
2 | Sony | Tokyo |
3 | San Fransico | |
4 | Samsung | Seol |
I want to add "Id" column from SQL table to my collection ColData so that my ColData will look like below:
Id | CompanyName |
1 | Apple |
2 | Sony |
3 |
I have tried AddColumns(ColData,"Id",Filter(CompanyData,CompanyName=ColData.CompanyName)); but it is not working Could anyone pls help
Solved! Go to Solution.
Hi @Shalom47 ,
Having the two columns the same name does not help, but try this
AddColumns(
ColData As aCol,
"Id",
LookUp(
CompanyData,
CompanyName = aCol.CompanyName
).Id
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Shalom47 ,
Having the two columns the same name does not help, but try this
AddColumns(
ColData As aCol,
"Id",
LookUp(
CompanyData,
CompanyName = aCol.CompanyName
).Id
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
258 | |
110 | |
97 | |
57 | |
40 |