Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-3102

Dynamic update of default value in dynamic forms

    XMLWordPrintableJSON

Details

    Description

      Hi,

      I was looking for a way to update dynamically the default value of a selectForm.
      My code is the following:

      %spark2.pyspark
      d_var = {}
      d_var['one'] = ["0"]
      d_var['two'] = ["1"]

      keys = []
      values = [('0', 'True'), ('1', 'False')]
      for key in sorted(d_var.keys()):
      keys.append((key, key))

      key = z.select('Keys', keys, keys[0][0])
      default_value = '0' if key == 'one' else '1'
      print default_value
      value = z.select('Option', values, default_value)

      When I change the selected value in the first select I expect that the second select will be updated but nothing happens, only in the first execution of the paragraph

      Attachments

        Activity

          People

            Unassigned Unassigned
            MSanchezz Manuel Sánchez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: