Forum Discussion
Neil_Marks_2466
Nimbostratus
Aug 17, 2017Can I query a table row count in the Presentation section of an iApp?
Is there a way to query the size of a table element in the APL language of an iAPP? The reason for asking is that I don't want to present an empty row if there hasn't been anything entered in that ta...
cjunior
Nacreous
Aug 18, 2017Hi Neil,
A way to perform is using a optional "HIDE = THIS". This way, the test fields will never appers on screen and you will get the expected results to present. In this case, I simply check the node count. You must change it to your query conditions needed.
section servers_pool1 {
optional ( "HIDE" == "THIS" ) {
choice has_nodes tcl { expr { [iapp::get_items ltm node] ne "" ? "yes" : "no" }}
}
string poolname display "xxlarge" default "pool1"
string pooldesc display "xxlarge"
optional ( has_nodes == "yes" ) {
table poolmembers {
string description display "large"
editchoice addr display "large" tcl {
package require iapp 1.1.0
return [iapp::get_items ltm node]
}
optional ( serverside_encryption.encryption == "Plaintext" ) {
string port display "small" validator "PortNumber" default "80"
}
optional ( serverside_encryption.encryption == "Encrypted" ) {
string port_secure display "small" validator "PortNumber" default "443"
}
}
}
}
Regards.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
