Tried a variant, this time for NEW entries (not EDIT), which I meant to do to begin with; sorry if that was confusing.
[cond_test]
attributes = region, manufacturer, model
options region = american{us}, japanese{jp}, european{eu}
show attributes = region
{us} options manufacturer = ford, chrysler, gm
{jp} options manufacturer = toyota{toy}, nissan{nis}, mitsubishi{mit}
{eu} options manufacturer = audi, mercedes, bmw, volvo, fiat
{us} show attributes = region, manufacturer
{jp} show attributes = region, manufacturer
{eu} show attributes = region, manufacturer
{toy} options model = corolla, prius, miata
{nis} options model = sentra, murano
{mit} options model = starion, outlander, mirage
{toy,nis,mit} show attributes = region, manufacturer, model
I'm not sure if my multi-character conditional names are allowed or not, but they do seem to work... somewhat. Note that I even tried a couple different ways of specifying which attributes to show (single versus multiple OR conditionals). The problem now is that all of the attributes are always shown, seeming to ignore the conditionals entirely.
Harry Martin wrote: |
Not sure if this is a bug or not; if it is not, kindly reclassify the category.
Following is a small example of what I will dub a 3-level, conditional logbook:
[cond_test]
attributes = region, manufacturer, model
show attributes edit = region
options region = american{1}, japanese{2}, european{3}
{1} options manufacturer = ford, chrysler, gm
{2} options manufacturer = toyota{4}, nissan{5}, mitsubishi{6}
{3} options manufacturer = audi, mercedes, bmw, volvo, fiat
{1,2,3} show attributes edit = region, manufacturer
{4} options model = corolla, prius, miata
{5} options model = sentra, murano
{6} options model = starion, outlander, mirage
{4,5,6} show attributes edit = region, manufacturer, model
This example is hardly complete, but it is sufficient to demonstrate the issue I am running into. This works until I select from the 2nd level (manufacturer); it won't display the dropdown for the model (I think my show attribute edit is supposed to display that). Is there a restriction on how many levels of conditional I can have? If there is, it would be disappointing because I am trying to do something similar to this example.
I hope there is something very simple I can do to correct this, or perhaps a completely different approach that accomplishes the same thing. I'd like to stick with the multi-level selection process as I have done here.
I am running elog 3.1.5 on Devuan Chimaera (approx. Debian Bullseye, sans systemd) in a Virtualbox VM.
|
|