Hello i m building my own component in powerapps, since i cannot use in components "collect" command i have decided to try placing table in to variable like this:
Set(Var_LOV,Table({ID:1,Text:""},{ID:2,Text:""}))
afther that i tried to Patch this table like this:
Is it possible to add empty row to table in variable like in collection?
Or is there some work around? I want just to press button and with each press of button to add a new row in to that table.
Thank you, now i understand better that collection cant be inside of component as its part because it is still part of app not component, but i can reach to that collection from component and change that collection in app from that component. It makes sense its retired feature it behaves differently than with variables.
Hi @Ondrix ,
Do you want to use the app's collection in the component?
If my assumption is correct, please turn on the " Collection assess in component scope" Setting.
After enabling it, please save and restart the app to use it.
Once enabled, create a collection in the app.
ClearCollect(CollectX,{ID:"1",Text:""},{ID:"2",Text:""})
Add a Button in the component and set 'OnSelect' attribute to the following formula:
Set(N,N+1);Patch(CollectX,Defaults(CollectX),{ID:2+N,Text:""})
Best Regards,
Wearsky
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional