The value xx is not found in the map

hello guys!

I add the numberseqmodule enum to a new value.I am using it for the create parameter form,but I got this error after when create a new value on numbersequencemodule. “The value 22 is not found in the map.”

I am doing CIL now ,what else Should I do?

Adding a new enum value shouldn’t cause that error.

What else you have done?

actually I create new parameter table and form.I used another enum value,so I did create number sequence and create parameter table and form but then I want to create a new enum value and use for my parameter table and form.Before I was using docu enum of NumbersequenceModule enum but then I created document enum,and use on parameter form.But When Itried to open form I got this error.

Which line of code is throwing the error?

void numberSeqPreInit()
runExecuteDirect =false;
numberSequenceModules = [NumberSeqModule::Document];
numberSeqApplicationModule = new NumberSeqModuleBuzDocument();
scope = NumberSeqScopeFactory::createDataAreaScope();
NumberSeqApplicationModule::createReferencesMulti(numberSequenceModules,scope);/// in this line

NumberSeqApplicationModule::createReferencesMulti(numberSequenceModules,scope);/// in this line giving this error

Okay, that’s a good little step, but it’s just a single method, not the complete stack of calls. You don’t yet where it fails inside createReferencesMulti().

public server static void createReferencesMulti(container _modulesList,
NumberSeqScope _scope = NumberSeqScopeFactory::createDefaultScope())
NumberSeqApplicationModule module;
Counter counter;
NumberSeqScope scopeOnServer;

if (prmisDefault(_scope))
scopeOnServer = _scope;
scopeOnServer = NumberSeqScopeFactory::cloneScopeOnServer(_scope);

for (counter = 1; counter <= conlen(_modulesList); counter++)
module = appl.numberSeqGlobal().numberSeqModulesMap().lookup(conpeek(_modulesList, counter)); //in this line again

in numberseqmodulesmap methods giving error.
public Map numberSeqModulesMap()
if (!numberSeqModulesMap)
return numberSeqModulesMap;

it does not show the value of 22 in numberseqmodulesmap. this is a map.

You have to go a little deeper into buildModulesMap and see what is causing the issue.

numberSeqModulesMap is built once and then cached. Restart the AOS to remove the cache and try it again.

I did before,I stoped I deleted auc files then restart.How can I remove cache? also deleted user’s datas.

I already answered it - restarting the AOS cleans the cache. So if the problem still exists, it’s not about cache. It means that their the map isn’t built correctly, or it’s not used in the right way.
First of all, review your code. You mentioned adding a new enum value, but not anything about a NumberSequenceModule for this class. If you don’t have any, your attempt to lookup the the class for the module must fail.

In my case a similar error occurred due to the import process making very frequent incCount() method call on sysOperationProgress class. Commenting the method call helped. For future reference only.