Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
uj24153
Binge Watcher

Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

this is error

Warning occurred while setting a field of an RoSGNode
-- Tried to set nonexistent field "email" of a "ContentNode" node
pkg:/components/HomeScreen/HomeScreenTaskReader.brs(133)

and this is code for assigning values to Content Node

function getCategoriesItem(p as object)

    item = {}
    if p.id <> invalid
        ?" id " p.id
        item.id = p.id
    else
        item.id = invalid
    end if

    if p.email <> invalid
        ?" email " p.email
        item.Email = p.email
    end if

    if p.image_url <> invalid
        ?" image_url " p.image_url
        item.HDPosterUrl = p.image_url
    end if

    if p.name <> invalid
        ?" name " p.name
        item.Title = p.name
    end if

    return item
end function

there is no error for Title, id, poster but why email is not assigning to it.
kindly help

 

0 Kudos
1 Solution

Accepted Solutions
RobMich
Channel Surfer

Re: Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

Hi @uj24153,

You’ll need to add an Email field to the content node before you can use it.  You can either create an object that extends a ContentNode and add Email as an interface field, or you can add it by calling p.addField(“Email”, “string”, true).  This will add the Email field to your ContentNode so you can assign values to it or reference it.

View solution in original post

4 REPLIES 4
RokuJonathanD
Community Moderator
Community Moderator

Re: Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

Hi @uj24153,

Are you trying to populate a ContentNode using the content metadata fields? If so, email is not a valid field. Otherwise, can you provide more context around with API you are using (for example, ChannelStore) so we can better help you?

Thanks,

Jonathan

uj24153
Binge Watcher

Re: Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

how i can use email then?

 

0 Kudos
RobMich
Channel Surfer

Re: Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

Hi @uj24153,

You’ll need to add an Email field to the content node before you can use it.  You can either create an object that extends a ContentNode and add Email as an interface field, or you can add it by calling p.addField(“Email”, “string”, true).  This will add the Email field to your ContentNode so you can assign values to it or reference it.

uj24153
Binge Watcher

Re: Tried to set nonexistent field "email" of a "ContentNode" node

Jump to solution

thanks it worked

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.