Possible to change shape in a panel not open?

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
HaakonRuud
Posts:2
Joined: Tue Apr 06, 2021 1:00 pm

Possible to change shape in a panel not open?

Post by HaakonRuud »

Is it possible to change a shape in a panel that is not open?

I'm able to change the shape when the panel is open with setValue("moduleName.panelName:shapeName","property","value");
The log viewer gives me feedback that the shape doesn't exist when the panel is not open. Is there a way to change the shape when the panel is not open?

My issue is a slow sql query. So instead of doing the query and add the result to a table when initializing the panel (slowly adding the rows in the table, looks bad), I want to do the query in the parent panel and send it to the table in the child panel. So when the child panel opens all rows are there in the table.

Or maybe there might be a better way of doing this?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Possible to change shape in a panel not open?

Post by leoknipp »

You cannot change a shape in a panel which is not loaded.
If you want to "pass" the values to the table you can use $ parameters or manager global variables.

Best Regards
Leopold Knipp
Senior Support Specialist

HaakonRuud
Posts:2
Joined: Tue Apr 06, 2021 1:00 pm

Re: Possible to change shape in a panel not open?

Post by HaakonRuud »

Thank you for the reply.

Not quite sure how to pass the values. For my query there will be approx. 100 rows that I need to pass.
My code looks simulare to this:

rc = dbOpenRecordset (conn, "SELECT bla bla bla" , rs);
if (!rc)
{
while (!rc && !dbEOF (rs))
{
rc = dbGetField (rs, 0, Number);
rc = dbGetField (rs, 1, Location);
rc = dbGetField (rs, 2, Name);

if (!rc)
{
table.appendLine("Number.", Number, "Name", Name, "Location", Location);
}
rc = dbMoveNext (rs);
}
dbCloseRecordset (rs);
}

How can I pass each row from the query into table in the panel not loaded (what should the table.appendLine line be instead)?
Is there somewhere in the documentation that can explain?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Possible to change shape in a panel not open?

Post by leoknipp »

As written in the previous answer you cannot call any function which is related to graphical objects for a panel which is not loaded.
One solution can be that you write the information to a manager global variable/mapping instead of calling the function to fill the table.

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1