Forum Discussion
FICO
3 years agoCommunity Manager
Is it possible to suppress error message "Uncaught (In promise) error: the scenario is currently locked and cannot be updated" popping out at the bottom of the screen?
We are currently on Insight 4.58. This error message seems to be happening after adding selection-changed VDL event to a table. Once this event is added, whenever a custom run mode is invoked on the page, the error message will appear at the bottom of the screen. It doesn't affect the behavior of the app and disappears after a few seconds but still a bit undesirable for the user to see them. Would be nice to suppress them if possible.
Thank you.
9 Replies
- FICOCommunity Manager
Hi,
does your 'selection-changed' event try to make any changes to the scenario? The event is fired when your custom runmode is executed and the table is redrawn. So if you try to write to the scenario or execute based on your selection then you will get the error message.
If you can let me know a few more details about what your selection-changed event handler is trying to do then it may be possible to adjust the logic to suit your needs.
Best regards,
Joc
- FICOCommunity Manager
Thank you! This is indeed the case. I need to put the row index selected into an entity using vdl-action-update-entity command. I suppose I can move this action right before the code calls the custom execution mode with vdl-action-execute. So my follow-on question is that within all actions grouped into a vdl-action-group, are they guaranteed to be executed in order, i.e., the next one starts only after the previous one finishes or not so? I think it's not true for vdl-action-execute but is it true for all the other type of actions?
- FICOCommunity Manager
Mostly that is true. But in the case of <vdl-action-execute> it returns when the Action has queued the job for execution then returns. We understand that this can cause issues but, in the case of model execution, it could be several hours before the job is done. There are some others and maybe we need to add to the documentation where Actions return while their subject is still in process.
- FICOCommunity Manager
Thank you and this makes perfect sense. I also observed that within the same vdl-action-group, if I try to update an entity value right before popping out a modal window using the vdlx-modal extension, and if the updated entity needs to be displayed on that modal window, then the displayed value for that entity sometimes still retain the old value. If I close out the modal window and pop it out again, then the new value gets displayed correctly the second time. It seems to be related to how quickly I click the button to pop out the modal window after changing the entity value.
- FICOCommunity Manager
That is because the VDL Action <vdl-action-update-entity> only sends the update to the model and then returns straight away. The next Action is triggered but the update to the model may not have resulted in an update on the view.
In this case, if you don't need to persist the value in the model, could you use a Vdl Var instead? https://www.fico.com/fico-xpress-optimization/docs/latest/insight5/vdl_reference/vdl-var.html
And substitute <vdl-action-set-var> https://www.fico.com/fico-xpress-optimization/docs/latest/insight5/vdl_reference/vdl-action-set-var.html
- FICOCommunity Manager
Thank you for the explanation. Can Vdl Var be displayed and edited on the interface though? I assumed vdl-field can only be associated with entities? Or maybe we can use the value attribute of the vdl-field and then add a vdl-event to capture the changes made?
- FICOCommunity Manager
Insight supports Unbound VDL Fields which work roughly as you describe.
Here is a snippet taken from the VDL Language App, which shows how to work with them:
<vdl-var name="factoryIndexFilter" value=""></vdl-var> <vdl-action-group name="updateFactoryFilter"><vdl-action-set-var var="factoryIndexFilter"></vdl-action-set-var> </vdl-action-group> <vdl-form><vdl-field label="Select Factory" label-size="3" size="3" options-set="Factories" options-include-empty="true" vdl-event="change: actions.updateFactoryFilter"></vdl-field> </vdl-form>Any dynamic expression can use this value with e.g: <div vdl-text="=vars.factoryIndexFilter"></div> or similar.
- FICOCommunity Manager
Thank you very much for all the replies! I think I've had all my questions answered on this subject. :-)
- FICOCommunity Manager
Glad to have helped.
Joc
Related Content
Related Content
How to make cuts added in a preIntsol callback globally valid (root node) instead of local to the current subtree?
I'm using the Xpress Optimizer Java API (com.dashoptimization, Xpress 9.4) to solve a MIP with lazy constraints that are generated dynamically. My constraints are all globally valid — they are not lo...2 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread5Views0likes2CommentsHi, Currently we are working with Blaze v7.6, if we want to move to DM, Do we need to migrate to latest blaze(v7.10.) first and then to DM? or directly to DM? If to DM directly, existing DTs, Other templates can we reuse? OR need to create from scratch?
If we can move to DM directly, existing DTs, Other templates in the project can we reuse? OR need to create everything from scratch as per the DM standards?11Views0likes1Comment