Is it possible to check if an Embedded View path property value is valid? I want to hide the component if it’s not, as I’m using a generic structure to generate the path, where some instances don’t have the item.
Essentially, I’m asking if there’s a function to check if a View path exists?
Also, can I get the view path of an open view? As in the path seen in the Designer project tree:
For this below, it would be Winery/Tank Farms/Main
I filed an internal ticket a long time ago to add a system.perspective.getViewNames() or similar tool for introspection, along the lines of the Vision function. That’s probably your best bet here.
Was anything like this ever implemented? I’m running into the same issue again (albeit in 8.1.5) where I’m using an Embedded View where the view path is dynamic. Often the path will be invalid (which is valid) and in these cases I want to hide the embedded view. I don’t see a way to do this. For me, an expression function viewExists('Path/To/View') would be great here to have
Haha, that’s works. I didn’t even think about doing it that way, cheers. I’ll use that for now
I guess for speed I could cache a list of all views found updated periodically or on trigger (eg designer save) and then read from that instead. I’ll see what kind of delay I get, shouldn’t be too bad though!