Hi
Is there a way to make the "create"-Button from a Entity List conditional? In Portalmanagement i have unter "Entity List - Options - Create" the option "Filter Criteria" (see Screenshot).
My Question: Is there a way to check "If count of records in entitylist is bigger than 0" then hide the "Create Button". Or is this requirement only with JavaScript makeable?
How to solve the problem (JavaScript, Liquid or Parameters in Portal Manager) doesn't really matter, but I need a way to hide the create-button when a record has already been created. Thx for any help.
solution:
$(document).ready(function () {
SetNewButtonVisibility();
});
function SetNewButtonVisibility() {
var list = $(".entity-grid").eq(0);
list.on("loaded", function () {
var rowCount = list.find("tr").length;
if (rowCount > 1) {
$(".create-action").hide();
}
else {
$(".create-action").show();
}
});
}