Error with key 0 was not found


I've created a Web Screen with a few labels, an input field, a Show Record, a couple of Buttons and a Combo Box.

On the properties of the Combo Box there's a variable assigned, a Source Entity and Attribute and a Value1 and Option1 (in this case 0 and some text) in the Special List parameters.

In Preparation there's some logic to handle if the entity has values or not to load (through an Aggregate) on to the Combo Box.

But every time the page loads, I get the error
[OSNOP1].DBO.[OUSR_RG6_MOBEGINEND] with key 0 was not found

The MOBEGINEND is the entity with the values that will fill the combo box.

When I do a debug - and this is the part that I really don't understand - the exception is thrown after the Web Block Footer. Everything else is ok, it does what is supposed to do with no errors.

I can't figure out what is left to do to not get any more this error (attached the application).! :)

Thank you!

Hi Carlos,
The problem is that you have a showrecord and you are trying to get a force value that dont exist (GetMOBeginEnd(Num)) , in this case 0, that is the Num variable.
When you execute the action GetMOBeginEnd(ID) and don't have that ID, will always give you that error.
Hi Carlos,
  follow the file without errors. However, I believe you need to fix the logic behind it.


Thank you for your help.
I've "moved around some icons" and its working fine.
I wasn't understanding why it was giving the error where it was but now its all good! :)