Warning: You can not change the value when using LogicHandler

I am trying to set (and reset) a Radio Group using this logic:

But whenever I add anything to the Checkd Value Logic of the Radio Button Group, I get log warnings like this:

sdk.js:16 Warning: You can not change the value when using LogicHandler.
The error occurred in the "NodeRadioButtonsGroup(Answer)" rendered by: NodeLayoutCell <- NodeLayoutRow <- Question List(RepeaterData) <- Survey Form(DataModelContainer) <- NodeBlock(home__question-block) <- NodeBlock(survey__wrap) <- NodeBlock(container) <- NodeBlock(Home) <- NodeBlock(Main) <- NodeBlock(Survey Page Container) <- Page "landing"
Node UID: 1e9db8e62c234825e777b31debee9f8d
Handler: onCheckedValueAssignment

In the web page, it seems to work like it should though, both setting values and resetting as expected.

What am I doing wrong, and how do I get rid of these warnings?

Hi @Egil_Helland

We recently released improvements in the UI-SDK which prevent changing a component property if it relies on the value from its LogicHandler before it was triggering an unnecessary rerender. Now, the value is ignored to highlight the problem in the logic it prints the warning message.

Could you please provide the entire warning call stack? and/or provide a link to the page where it appears

Regards,
Vlad

Not sure I understood that. What is a value’s LogicHandler?

Anyway, you should be able to see this in action by going here, and then clicking the “Start…” button, and clicking one or more of the radio buttons you get:

https://app.dynamicrelations.no/api/files/ui-builder/containers/survey-v1/index.html?page=landing&code=59b577ce&type=OWN_SINGLE&id=9BC38E73-EA21-4C4E-99F1-E668FFCF42EE

Here is the call stack:

bundle.js:5 Object Keys: 0
bundle.js:6 Repeater:0
bundle.js:5 Object Keys: 0
bundle.js:6 Repeater:7
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
sdk.js:16 Warning: You can not change the value when using LogicHandler.
The error occurred in the "NodeRadioButtonsGroup(Answer)" rendered by: NodeLayoutCell <- NodeLayoutRow <- Question List(RepeaterData) <- Survey Form(DataModelContainer) <- NodeBlock(home__question-block) <- NodeBlock(survey__wrap) <- NodeBlock(container) <- NodeBlock(Home) <- NodeBlock(Main) <- NodeBlock(Survey Page Container) <- Page "landing"
Node UID: 1e9db8e62c234825e777b31debee9f8d
Handler: onCheckedValueAssignment
message @ sdk.js:16
warn @ sdk.js:16
(anonymous) @ sdk.js:16
(anonymous) @ sdk.js:16
onChange @ sdk.js:16
chainedFunction @ sdk.js:16
handleInputChange @ sdk.js:16
Rb @ sdk.js:16
Xb @ sdk.js:16
Yb @ sdk.js:16
Ze @ sdk.js:16
se @ sdk.js:16
(anonymous) @ sdk.js:16
ht @ sdk.js:16
Nb @ sdk.js:16
jd @ sdk.js:16
yc @ sdk.js:16
hd @ sdk.js:16
Z.unstable_runWithPriority @ sdk.js:16
gg @ sdk.js:16
Hb @ sdk.js:16
gd @ sdk.js:16
bundle.js:53 Value:
bundle.js:54 3
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:53 Value:
bundle.js:54 undefined
bundle.js:5 Object Keys: 1
bundle.js:6 Repeater:7

there are two types of handlers:

  • Event Handlers - go up from the UI (OnClick/OnChange/OnPageEnter/etc)
  • Logic Handlers - go down to the UI (ValueLogic/ContentLogic/VisabilityLogic/DataModelLogic/etc)
1 Like

Thank you, I was able to reproduce the issue, it doesn’t depend on your logic, we are going to fix it asap.

Ahh, great, thank you.

I am still amazed every time I have not made the error… :smiley:

Any update on the fix? I just ran into this same issue.

Tim

@Tim_Jones

Sorry for the inconvenience. it’s going to be fixed today.

Regards

Thanks @viktor.liablin. If it is helpful, this is the message I’m getting -

Warning: You can not change the value when using LogicHandler.
The error occurred in the "NodeButton(actedOnBtn)" rendered by: Page "testDataGrid2"
Node UID: 0d06052bd34ff0a47f750a4392dc0b69
Handler: onDisabledStateAssignment
message	@	sdk.js:16
warn	@	sdk.js:16
(anonymous)	@	sdk.js:16
(anonymous)	@	sdk.js:16
set	@	sdk.js:16
onClick	@	bundle.js:30
runHandler	@	sdk.js:16
W.available.M.<computed>	@	sdk.js:16
Rb	@	sdk.js:16
Xb	@	sdk.js:16
Yb	@	sdk.js:16
Ze	@	sdk.js:16
se	@	sdk.js:16
(anonymous)	@	sdk.js:16
ht	@	sdk.js:16
Nb	@	sdk.js:16
jd	@	sdk.js:16
yc	@	sdk.js:16
hd	@	sdk.js:16
Z.unstable_runWithPriority	@	sdk.js:16
gg	@	sdk.js:16
Hb	@	sdk.js:16
gd	@	sdk.js:16

This is the codeless test case I was trying -

I have two buttons on a test page. Clicking one is supposed to disable the second (actedOnBtn).

@Tim_Jones
Perhaps you have “Disabled State Logic” for the “actedOnBtn”

Yes. I didn’t realize that was the problem.

Thank you,
Tim