Skip to Content
author's profile photo Former Member
Former Member

Incorrect Value in Boolean Control in Workflow

Hi all,

I'm seeing some strange behaviour with two attributes in the workflow interface: MX_DISABLED and MX_LOCKED. Even though the attributes are set to 0 in the database, the web interface has them checked (ie: Value = 1).

I've taken a look at the array that is coming back in PHP and found:

If the display type is set to BOOLEAN I get from the database:


[MX_LOCKED] => 0

But when I get to the workflow interface the array is:


[MX_LOCKED] => 1

If I set the presentation type of MX_DISABLED to SINGLESELECT I get the following array at the web interace:


[MX_LOCKED] => 1

Therefore it seems to be that the display type is causing the incorrect setting the values of these two attributes. I've tried it on a different attribute (one created for testing) and it appears to work fine. It also correctly sets them to 0 if the user has no values (ie: Not Set).

I'm using IDM7.0SP5.

Does anyone have an idea of where these are manipulated in PHP so I can track things down? Has anyone seen this before?


Peter Wass

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 25, 2009 at 12:32 AM

    OK - I've traced it to the following function:



    Function: defaultentries

    foreach (array_keys($isMandatory) as $attrnamekey)
    	if(isset($attrPresType[$attrnamekey]) && $attrPresType[$attrnamekey] == 5 && *$aEntry->getAttribute($attrnamekey)!=""*){
    		$outputArray[$attrnamekey] = 1;

    If the entry exists, it is ALWAYS set to 1. For most booleans this is not a problem - they are removed when the value is set to 0. However, MX_LOCKED and MX_DISABLED are present even if the value is 0.

    Therefore these will always be set to 1.

    This can be fixed by modifying the PHP to be:

    if(isset($attrPresType[$attrnamekey]) && $attrPresType[$attrnamekey] == 5 && *($aEntry->getAttribute($attrnamekey)!="" && $aEntry->getAttribute($attrnamekey)!="0")* ){

    Peter Wass

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.