Demo VisualData 1.0 / Dependent values

Dependent values: Difference between revisions

From Wikisphere
Jump to navigation Jump to search
(Created page with " {{#pagepropertiesform: Dependent values |title = Dependent values |action = create |edit-page = |return-page = |view = inline |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = json |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}")
 
No edit summary
Line 1: Line 1:
The following form uses the schema [[PagePropertiesSchema:Dependent_values]].
The first field (country) is a OOUI DropdownInputWidget with items taken from the template [[Template:Countries]].
The second field is a LookupElement with query
<pre>
[[name::<country>]][[states/name::<value>~]]
</pre>
where <code><nowiki><country></nowiki></code> is the name of the first field and <code><nowiki><value></nowiki></code> is the value being inserted in the input.<!-- Note that the field names if nested have to be expressed using a path, for instance -->. The requested printout is <code>states/name</code> that match the path <code>properties/states/items/properties/name</code> in the schema [[PagePropertiesSchema:Country]]. (where only relevant property names are concatenated, leaving aside <code>properties</code> and <code>items</code> that belong to the schema structure).


{{#pagepropertiesform: Dependent values
{{#pagepropertiesform: Dependent values

Revision as of 10:26, 5 December 2023

The following form uses the schema PagePropertiesSchema:Dependent_values.

The first field (country) is a OOUI DropdownInputWidget with items taken from the template Template:Countries.

The second field is a LookupElement with query

[[name::<country>]][[states/name::<value>~]]

where <country> is the name of the first field and <value> is the value being inserted in the input.. The requested printout is states/name that match the path properties/states/items/properties/name in the schema PagePropertiesSchema:Country. (where only relevant property names are concatenated, leaving aside properties and items that belong to the schema structure).



{{#pagepropertiesform: Dependent values |title = Dependent values |action = create |edit-page = |return-page = |view = inline |popup-size = medium |css-class = |pagename-formula = |edit-freetext = false |edit-categories = false |edit-content-model = false |default-categories = tasks |default-content-model = json |layout-align = top |popup-help = true |submit-button-text = |layout = tabs |submit-button-text = |validate-button-text = }}