How to check if container is present or not in another container?

How to check if container is present or not in another container?
Actualy i do someting like this, but i think it’is the wrong way.

container server {
leaf servername {
type string {
length “1…55”;
tailf:info “WORD; prefix:max 55 digits”;
}
tailf:cli-drop-node-name;

container access {
must “(string-length(…/server/servername) == 0” {
tailf:dependency “.”;
error-message “set server first!”;
}

i pretty sure there is a solution but i didn’t found it.

I’m not exactly sure what you want to do but how about
must "count(../server/servername) > 0"