Skip to content

Commit 08d1f64

Browse files
committed
[KNOWAGE-2252] Docs for isValid func in dataset's script
1 parent e9a610f commit 08d1f64

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

knowage/src/main/resources/predefinedJavascriptScript.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ function getInClauseForNullableValues(colName, parName){
7979
}
8080
}
8181

82-
parameters.isValid = function(key) {
82+
function isValid(key) {
8383
return key != null
8484
&& parameters.get(key) != null
8585
&& parameters.get(key) != ''
8686
&& parameters.get(key) != "''"
8787
&& parameters.get(key) != "null"
8888
&& parameters.get(key) != "%";
8989
}
90+
91+
parameters.isValid = isValid;

knowage/src/main/webapp/themes/sbi_default/html/dsrules.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
, ")" )</i>
4848
<hr />
4949
</li>
50+
<li><b>isValid('attribute_name') </b>: Returns true if the value
51+
of the attribute is not null or empty or equals to "''"" or equals
52+
to "null" or equals to "%" <br />
53+
<i><b>Example:</b>
54+
isValid('${multi_value_attribute}')</i>
55+
<hr />
56+
</li>
5057
</ul>
5158
</div>
5259
</body>

knowageutils/src/main/resources/predefinedJavascriptScript.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ function getInClauseForNullableValues(colName, parName){
7979
}
8080
}
8181

82-
parameters.isValid = function(key) {
82+
function isValid(key) {
8383
return key != null
8484
&& parameters.get(key) != null
8585
&& parameters.get(key) != ''
8686
&& parameters.get(key) != "''"
8787
&& parameters.get(key) != "null"
8888
&& parameters.get(key) != "%";
8989
}
90+
91+
parameters.isValid = isValid;

0 commit comments

Comments
 (0)