cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
evanscona
Frequent Visitor

Function

Can someone help me resolve this function?

 

ClearCollect(menubar, Table({Title: "Helpline", Icon: icon_helpline}))

 

aaa.png 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RusselThomas
Microsoft
Microsoft

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

View solution in original post

10 REPLIES 10
JR-BejeweledOne
Super User
Super User

Try adding "" around icon_helpline



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

That did not work either 

 

JR-BejeweledOne
Super User
Super User

Is Table an existing table of data?

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
JR-BejeweledOne
Super User
Super User

If Table is not a table of existing data, your formula should look like this:

 

ClearCollect(menubar,

    {

       Title: "Helpline",
       Icon: icon_Helpline

    }
)


If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Pstork1
Dual Super User III
Dual Super User III

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?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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

 

RusselThomas
Microsoft
Microsoft

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

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

I don't think you can show text and an icon in a dropdown.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
RandyHayes
Super User III
Super User III

@evanscona 

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?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (28,224)