Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Changing the status of an Object List item

Hi Guys,


I'm trying to change the state and text on a particular Object List Item in a list. When a tick box is checked the object list item needs to have the text "success" and the state changed to success also.


However I can't seem to get the state or text to change even when using the console.


Is there something I'm missing?


For example if I run this command in the console oObjectListItem.setState('Success'); nothing happens on the page but when I run oObjectListItem.getState(); it has changed to 'Success'?


Thanks,

B


Hi Brandon,


You should apply the setState method on each item of your list.


For instance :

var itemsList = yourList.getItems();

for (i = 0; i < itemsList.length; i++) {

   itemsList[i].setState("Success");

}


Best regards.



PEB

Hi Brandon


the article on 'Conditional Formatting' in Neptune Explored will also help you solve your question.

https://template.neptune-software.com/neptune/sdk/explored.html#Documentation-Display&%7B%22object%22%3A%22c00163EDC99661EE586C8E2122B03389C%22%7D


Regards

Christoph

Hi Guys,


Thanks for the guidance. I've managed to change the state but I still can't see the effect on the web page. Do I need to refresh something or reload the object in some way? I call a method like .getState and the value has changed but I can;t see it on the object itself? e.g. the object list item state has not changed to green.


Thanks,

B

Login or Signup to post a comment