Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

Default variable values in an Application

Erlebacher
Level 4
Default variable values in an Application

Inside an Application, I define an "Edit project Variables" section, followed by my variable definitions: an "INT" and a "STRING".

2022-12-05_22-07-00.png===========

[
{
"name": "welcome",
"label": "on",
"defaultValue": "5.2 is my game",
"mandatory": true,
"canSelectForeign": false,
"markCreatedAsBuilt": false,
"allowDuplicates": true,
"visibilityCondition": "true",
"getChoicesFromPython": false,
"triggerParameters": [],
"disableAutoReload": false,
"canCreateDataset": false
},
{
"name": "my_int",
"type": "INT",
"label": "my int label",
"mandatory": true,
"canSelectForeign": false,
"markCreatedAsBuilt": true,
"allowDuplicates": true,
"visibilityCondition": "true",
"getChoicesFromPython": false,
"triggerParameters": [],
"disableAutoReload": false,
"canCreateDataset": false
}
]==================================

I set visibility to True, and do not provide default variables. I am hoping that the default variables defined in the Variables section of my project will provide the default values. Here are my variable definitions:

.........

{
"my_int": 47,
"my_float": 3.14159,
"my_string": "my name is Gordon"
}

........

defined as both project and locations. I would like the values of these variables to be transmitted to the Application interface when I click on "Test". But that does not happen. Instead, I get:

2022-12-05_22-19-07.png

Notice that the string gives an error of "undefined parameter". I can find no explanations, no good examples online. Any insight would be greatly appreciated. I am at a complete loss at this time. Thanks.


Operating system used: mac, Ventura


Operating system used: mac, ventura

0 Kudos
3 Replies
Erlebacher
Level 4
Author

Nobody appears to know the answer to my question? 

People who work at Dataiku, perhaps the person who wrote the "Application Designer" could help out? 

Here is a related question: can somebody point me to a working example of the custom UI? Given that nobody knows the answer to my previous question, I might take the more complex route. Specifically, I would like, if possible, an example using the three elements below:  (thanks!)

2022-12-06_15-49-15.png

0 Kudos
Erlebacher
Level 4
Author

Here is possibly a simpler question 🙂

I define a project variable:    {"welcome": "Hello World"}

In a custom UI in the Application Designer, I have some HTML and would like to expand this variable. How is this done? I tried (unsuccessfully): 

<div ng-app="myApp" ng-controller="myCtrl">
<input ng-model="name" value="${welcome}">
</div>

I simply got ${welcome} returned to me, verbatim. 

Any insight is appreciated. Thanks.

0 Kudos
Erlebacher
Level 4
Author

Here is some of what I have been trying in the custom UI.  
(I have tried to use code brackets, but keep getting the error that there is illegal HTML in my posts and I am prevented from posting). 

In the HTML section: 

<div ng-app="myApp" ng-controller="myCtrl">
<input ng-model="name">
<p>The input field is bound to the "name" variable:</p>
{{name}}
</div>

In the JS section: 

var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.name = "John Doe";
});

And I do not know what to put into the Angular module section. I have read documentation, but see no example that documents exactly what to do for the custom UI. Could somebody please post an example or provide a link to one? Thanks.

0 Kudos