On Wednesday, October 28, 2020 at 2:21:46 AM UTC-7, Gerald Weis wrote: > > I enter 3 values > 1. the minimum value > 2. the maximum value > 3. the real measured value > > The radio widget should now automatically change the value in the display. > If the real measured value is <than the minimum value, then the value > should be set to 1. > If the real measured value is> than the maximum value, then the value > should be set to 3. > Otherwise the value should be set to 2. > This provides an overview of how the value has changed, whether it is in > the normal range, or whether it has moved up or down. >
If I understand correctly, it would seem that want to use the radio buttons for *display* only, not as input controls that can be changed. If that is the case, then why not just use text output (e.g., "low", "high", "normal")? Something like this: min: <$edit-text field="minval" /> max: <$edit-text field="maxval" /> real: <$edit-text field="realval" /> <$list filter="[{!!realval}compare:number:lt{!!minval}]"> LOW </$list> <$list filter="[{!!realval}compare:number:gt{!!maxval}]"> HIGH </$list> <$list filter= "[{!!realval}compare:number:gteq{!!minval}then{!!realval}compare:number:lteq{!!maxval}]" > NORMAL </$list> If you must use radio buttons as output, then you don't actually need the TiddlyWiki <$radio> widget, and instead, can use "plain" HTML radio buttons to produce the desired display, like this: min: <$edit-text field="minval" /> max: <$edit-text field="maxval" /> real: <$edit-text field="realval" /> <$list filter="[{!!realval}compare:number:lt{!!minval}]"> <input type=radio checked /> <input type=radio /> <input type=radio /> </$list> <$list filter="[{!!realval}compare:number:gt{!!maxval}]"> <input type=radio /> <input type=radio /> <input type=radio checked /> </$list> <$list filter="[{!!realval}compare:number:gteq{!!minval}then{!!realval}compare:number:lteq{!!maxval}]"> <input type=radio /> <input type=radio checked /> <input type=radio /> </$list> You can, of course, place the above bits of syntax inside a table layout to further suit your desired display. I leave that to you to work out. enjoy, -e -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5c2bf120-87fa-4186-8b01-680723fda6fao%40googlegroups.com.