[OUTSYSTEMS].dbo.[OSSYS_USER_T18] with key 0 was not found
Application Type
Traditional Web
Service Studio Version
11.12.1 (Build 49734)

I am new to Outsystems and was tasked to debug an existing system. The error happens when a combo box is set back to option 1 (which defaults to "-" and with value -1). That combo box has an onclick screen action wherein it automatically changes the contents of another combo box and fills a sourced data from a foreign key for another 3 input boxes. Looking and understanding the sequence of events, I think the error happens because it tries to find the Id '0' but fails to find one that's why it can't reset the values of the input boxes. I tried changing the value of option 1 to check if the Id would change but it isn't so I'm not sure.


P.S. I tried to search the web but this error ...[OSSYS_USER_T20]... is usually what pops up. I have no idea if there are the same or not. Please enlighten me. Thank you!

mvp_badge
MVP
Solution

No, I think I did understand what you mean. In Traditional Web, the Combo Box's Peroperties looks like this:

This Combo Box shows all records from the MyEntity Entity, showing the Description Attribute and storing the Id in MyEntityId. It also has a special list, showing "-" (without the quotes) as first options, and if that option is selected, MyEntityId will be NullIdentifier(). The "Value 1" of "0" is a dummy, as we're not interested in its actual value. In case you are interested in it, you need to assign the Special Variable Property.

So if you have an OnChange Screen Action, when the user changes the Combo Box's selection to "-", MyEntityId will be NullIdentifier(), and shouldn't be used elsewhere for querying data.


Hi Roy,

are you getting the dropdown values from another module?

I've seen that error many times when the producer module (database) changes and it's not refreshed in the consumer module (User UI). If that's the case, it should only need to refresh dependencies and publish.

Regards

Hi Jose,

Yes, the dropdown values are sourced from the "core" module of the application.

I don't exactly know how to interpret the explanation you gave since I'm fairly new in the Outsystems. Can you please elaborate what and where I should look for? I don't think the system changes a value from the table if I understand your reply correctly.

mvp_badge
MVP

Hi Roy,

Welcome to OutSystems!

A Combo Box, in Traditional Web, with a default "-" should have a  Special List assigned, ideally the "-" should not be part of the list. Obviously, if there's code that assumes there will always be something selected and changes other combo boxes because of that, that code must be changed to take into account the "-" option, in which case probably nothing should be done but clear those other combo boxes.

Hi Kilian,


I think I misinterpreted my explanation. What I mean is that the Option 1 of that combo box is set to "-" minus the quotation marks. And its Value 1 is set to -1. I hope I cleared it now. But thanks for the quick reply!

mvp_badge
MVP
Solution

No, I think I did understand what you mean. In Traditional Web, the Combo Box's Peroperties looks like this:

This Combo Box shows all records from the MyEntity Entity, showing the Description Attribute and storing the Id in MyEntityId. It also has a special list, showing "-" (without the quotes) as first options, and if that option is selected, MyEntityId will be NullIdentifier(). The "Value 1" of "0" is a dummy, as we're not interested in its actual value. In case you are interested in it, you need to assign the Special Variable Property.

So if you have an OnChange Screen Action, when the user changes the Combo Box's selection to "-", MyEntityId will be NullIdentifier(), and shouldn't be used elsewhere for querying data.


Thank you for taking your time and explaining it thoroughly. And pardon for thinking that you did not understand my question, my bad. Anyway, scratch my first comment and thank you for informing me that it results to null. I understand it better now and I think I know what to do. Thanks again for the help!

mvp_badge
MVP

You're most welcome, glad I could be of help. Happy coding!

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