Hi, all
I'm relatively new to Appian and I need a bit of help.
I have an interface that displays a read only grid..
I use a record action which runs in a dialog box.
Once the record action is run, the grid refreshes and displays the data that has been entered.
I have a "Submit" button which I would like to hide whilst the read only grid has no data to display.
Any advice would be helpful.
Thanks
Stephen
Discussion posts and replies are publicly visible
The button component has a showWhen parameter. Create a condition checking for existing data and pass the result to this parameter.
HI stephenk0001, As Stefan said , you can use showWhen parameter of the button and you can use a!isNotNullOrEmpty function to check the data that feeds the grid. If you are using local variable to populate the data into grid then your condition would be something like below
a!buttonWidget(
showWhen:a!isNotNullOrEmpty(local!gridData)
),
or if you have other values then you can use those values also to decide the visibility of the button.
Remember Stephen Kane that a!isNullOrEmpty doesn't work with a CDT. For that, you will have to build your custom function.
Thanks team
In the end I needed to use the showWhen and write a query referencing my recordType.
I hope you did not directly write that query in the grid. Querying the DB for each row will become a performance issue.
Hi Stefan
I wrote the query in a showWhen on the button itself.
I only need to see the grid is not empty.
So
I can't use the "showWhen" attribute to hide the "Submit" button - testing showed that although it seemed to work in the interface, it did not work in Tempo.
One of my colleagues suggested I should rather use validation to ensure the grid cannot be empty.
That solution accomplishes my purpose.
Thanks all for your input!