If then else statement with options

I have this code with if then else that comes up with error “Input variable ‘projectUploadApp’ is of type pickString and must include ‘options’”:


  "inputs": [
      {
         "type": "pickString",
         "id": "appType",
         "description": "What application type do you want to upload?",
         "options": [
            "london",
            "paris"
         ],
         "default": "london"
      },

      {
         "type": "pickString",
         "id": "projectUploadApp",
         "description": "What application project do you want to upload?",
	     "if": {
			"id": {
				"appType": {"london"}
			}
		 },
		 "then": {
			 "options": [
				"firstVar",
				"secondVar",
				"thirdVar"
                                ]
                  },
         "else": {
			 "options": [
				"firstparis",
				"secondparis",
				"thirdparis"
                                ]
                  },
          }
    }

There was a simple way around this: create 2 separate projectUploadApps one for London, one for Paris with the options specific for London in London and similarly for Paris

Hi @ade_is_here,

Glad that you found a solution :slight_smile:

However, are you sure that you are on the correct board? This is about JSON Forms which is a JSON Scheme based rendering framework for forms. Your question seems to be VS Code related.