Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
uj24153
Level 8

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
Level 8

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
Roku Employee
Roku Employee

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
Level 8

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

Jump to solution

how i can use email then?

 

0 Kudos
RobMich
Level 8

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

uj24153
Level 8

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

Jump to solution

thanks it worked

0 Kudos