# modern UI - change widget value only if condition met

**URL:** <https://forum.knime.com/t/modern-ui-change-widget-value-only-if-condition-met/91195>\
**Category:** Node Development\
**Created:** [January 14, 2026, 12:57pm UTC](https://forum.knime.com/t/modern-ui-change-widget-value-only-if-condition-met/91195 "2026-01-14T12:57:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niederle](https://forum-cdn.knime.com/user_avatar/forum.knime.com/niederle/32/42_2.png) [@niederle](https://forum.knime.com/u/niederle)\
**Post date:** [January 14, 2026, 12:57pm UTC](https://forum.knime.com/t/modern-ui-change-widget-value-only-if-condition-met/91195/1 "2026-01-14T12:57:38Z")

</div>

Hi,

I try to implement a widget\_1 which will change its value only if another widget\_2 is set to a specific value. otherwise I would like to let the value of widget\_1 untouched. I tried to use a `@ValueProvider` (`computeFromValueSupplier(...)`) for widget\_1 using a `@ValueReference` of widget\_2 but I don’t know how to avoid a value change if my condition is not met. I don’t know how to retrieve the current value of widget\_1.  
I assume it’s possible to get such a behavior and I would be happy if anybody could help me.

Antje

---

<div class="post-metadata">

**Author:** ![hotzm](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/h/958977/32.png) [@hotzm](https://forum.knime.com/u/hotzm)\
**Post date:** [February 6, 2026, 4:00pm UTC](https://forum.knime.com/t/modern-ui-change-widget-value-only-if-condition-met/91195/2 "2026-02-06T16:00:46Z")

</div>

Hi @niederle,

if you did not already get it working, I think what you need is to simply throw a `StateComputationFailureException` in the `computeState` method if you don’t want to update the value. I don’t know which version you are developing against, since the API is still evolving… That’s it’s name at least in the current nightly.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [May 7, 2026, 4:01pm UTC](https://forum.knime.com/t/modern-ui-change-widget-value-only-if-condition-met/91195/3 "2026-05-07T16:01:27Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
