From 762a98e767d21db7c466de75dff485a1b7e7fff1 Mon Sep 17 00:00:00 2001 From: catattack055 Date: Thu, 4 Aug 2022 13:05:45 +0000 Subject: [PATCH] BG Issue 1342: Update docs to reflect possible hazard --- docs/plugins/python/_includes/choices.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/plugins/python/_includes/choices.adoc b/docs/plugins/python/_includes/choices.adoc index c38c896..a50c44a 100644 --- a/docs/plugins/python/_includes/choices.adoc +++ b/docs/plugins/python/_includes/choices.adoc @@ -115,9 +115,11 @@ NOTE: Currently you must use a command from the same system (this restriction wi ==== Choice parameters -It's often useful to have the choices for one parameter depend on the current value of another. To do that you can use choice parameters. +It's often useful to have the choices for one parameter depend on the current value of another. To do that you can use choice parameters. -To create a reference on another parameter enclose its key in `${}`. How the parameter is passed depends on what choice source is being used. +To create a reference on another parameter enclose its key in `${}`. How the parameter is passed depends on what choice source is being used. + +NOTE: When initializing the command creation page, BeerGarden will attempt to update all dependencies for choice parameters at once. If the dependent parameters are defined in such a way that causes side effects inside the command (for example, if A is a choice parameter that depends on B and C, but updating C changes an internal value A and B need), this could lead to unintended consequences or destructive behavior during command load. For 'command' types the parameter will be passed as an argument to the command. For example, suppose you have two parameters: `day_type` and `day_of_week`. You'd like the choices for `day_of_week` to depend on what the user has selected for `day_type`: [source,python]