Can someone help me resolve this function?
ClearCollect(menubar, Table({Title: "Helpline", Icon: icon_helpline}))
Solved! Go to Solution.
Hi @evanscona ,
Taking a stab based off the image you posted - the green highlight of menubar in your formula typically means that "menubar" is the name of an object - like a gallery, or something. It's not a collection that can contain data.
If, for example, you've created a gallery or a text label or something, and called it "menubar", you can't collect data into that name. The name is reserved for that object - and the object itself can't contain table data.
Also, if you're just collecting a single row, unless you want a nested table, you can just specify the row data without the Table() function;
Try change the name of the collection to something like collectMenuBar.
ClearCollect(collectMenubar, {Title: "HelpLine", Icon: icon_helpline})
You can then set your Items: property of your (presumably) menubar gallery to collectMenuBar.
Hope this helps,
RT
Try adding "" around icon_helpline
That did not work either
Is Table an existing table of data?
If Table is not a table of existing data, your formula should look like this:
ClearCollect(menubar,
{
Title: "Helpline",
Icon: icon_Helpline
}
)
What is icon_helpline? Is that the name of a screen you want to navigate to? You mentioned it was a menu system you are trying to create. Or is Icon supposed to be something else that shows in the dropdown?
The icon_helpline is an image uploaded from PC. I wanted to create a navigation drop-down list with name "helpline" with an image attached to the left of the helpline
Hi @evanscona ,
Taking a stab based off the image you posted - the green highlight of menubar in your formula typically means that "menubar" is the name of an object - like a gallery, or something. It's not a collection that can contain data.
If, for example, you've created a gallery or a text label or something, and called it "menubar", you can't collect data into that name. The name is reserved for that object - and the object itself can't contain table data.
Also, if you're just collecting a single row, unless you want a nested table, you can just specify the row data without the Table() function;
Try change the name of the collection to something like collectMenuBar.
ClearCollect(collectMenubar, {Title: "HelpLine", Icon: icon_helpline})
You can then set your Items: property of your (presumably) menubar gallery to collectMenuBar.
Hope this helps,
RT
I don't think you can show text and an icon in a dropdown.
You formula is fine from a syntax scenario.
My only question would be, what is the actual error that you are getting? You show the red underlines, but what is the error that shows for that formula?
My guess is that you potentially have another place that you are trying to use this collection (why a collection for this I don't know) and you are providing a different signature. How else are you using this collection in your app?
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
265 | |
209 | |
76 | |
42 | |
33 |
User | Count |
---|---|
347 | |
219 | |
117 | |
72 | |
54 |