This topic is locked

Extended Search and Filter panel: setting field value of boolean

9/29/2022 7:44:01 AM
PHPRunner General questions
H
Henny Sol author

In AfterTableInit I wanted to set the value of the field "done" in my table "Acties" to False:

$srchObj = SearchClause::getSearchObject("Acties");
if(!$srchObj->searchStarted() ) {
$srchObj->setFieldValue("done", 1);
}

The value 1 corresponds here to false and 0 to true.

When I want to set the value of the "done" field on the filter panel to false this is the other way around (1=true and 0=false) which is rather confusing:

I updated the url link of the menuitem (in Style/MenuEditor and in Designer/CommonPages/menu (field URL param) ) with "f=(done~equals~0)" and then all Actions that still had to be Done were shown.

Best regards,
Henny Sol
(PHPRunner 10.8 build 39787 x64)

Sergey Kornilov admin 9/29/2022

Sorry, it is a bit confusing for me, not sure what problem you trying to solve here.

Is this a question about the correct filter syntax in the URL? If yes, then you need to run this filter manually first to see what kind of URL it generates. I'm sure you are asking somethign else.

H
Henny Sol author 9/30/2022

I only wanted to report to you that when Searching is done phprunner considers 1 to be false and 0 to be true, but when a Filter must be set phprunner considers 1 to be true en 0 to be false.

Though I am a newbie I think it would be better if phprunner would handle true/false in a consistent way.