I have used the same web block for 2 screens

I have re used the web block to the other screen also . In one of the screen , when I select the drop down I am getting an popup error " Index out of bounds. Index 0 for empty list" . Why is this error coming? 

Regards,

Varshitha

mvp_badge
MVP

Hello Varshitha ,

Are you manipulating any list by index in your webblock ?

something like list[indexcount].something 

Regards.


mvp_badge
MVP

Hi Varshitha,

Can you share more details like what functionality is defined in your web block?

it's input parameter? expected result/functionality?

when you select value from dropdown, what functionality you are calling onchange event of it?

If possible can you share the sample oml?

if you provide more information, it will help the community members to diagnose/identify the root cause of the problem. :)


Thanks,

Manish Jawla

Hi Varshitha M S

Seems you are trying to select one element from an empty list

Debug the app and check if the list from the dropdown is empty or what's causing this empty call element.

Regards

Gonçalo Almeida

Hello Varshitha M S. I think You are selecting one element from an empty list.

Please try to add a breakpoint and execute the debug to see more details about this list. 

Best Regards,

Paulo Russo.

www.paulorusso.pt

Be sure that the dropdown list (may be an aggregat list) also is available in the 2nd screen, wehre you used the web block.

mvp_badge
MVP

Hi Varshitha,

As you see from previous replies a lot of people try to help you, but you didn't gave enough details for anybody to be sure what the root cause is of your problem. 

Next time try to give more information with for example screen prints.

If possible share and OML file with the problem reproducible. That will get you the best help.

Also very important always set the type of application that you are building because most of the time the answer to your problem can only be given correctly when we know if you are building a traditional web, a reactive web or mobile application.

And before you ask here on the forum, always check the error log tab in service center. If you don't understand the error details shown there share it in the forum in your post. Normally it's pretty easy for someone else to help you pinpoint what the problem is.

Regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.