Jump to content
Sign in to follow this  
Anabel

place the value of a z capo to the goup_id field

Recommended Posts

Hello good afternoon

I have a detail with a spel since this to place the value of the zGrupop_inicial field in the group.id field I share the spel code

    if(type=="R" && active == 1)
    {
        if(status.code == "OP")
        {
            if(codeRol=="SOLSERRED")
            {
            send_wait(0, this, "get_attr_vals", 1, "zGrupo_Inicial");
            zGrupo_Inicial=msg[3];
            
                if(is_null(zGrupo_Inicial) || is_empty(zGrupo_Inicial) || zGrupo_Inicial=="")
                {            
                    send_wait(0, this, "call_attr", "zGrupo_Inicial", "set_val", group.id, "SURE_SET");
                    logf(SIGNIFICANT, "successfully set campo zGrupo_Inicial");
                }else{
                logf(SIGNIFICANT, "campo zGrupo_Inicial lleno");
                }
                    
            }
        }
        
        if(status.code == "RE")
            {            
                if(codeRol=="SOLSERRED")
            {
                    send_wait(0, this, "call_attr", group.id, "set_val", "zGrupo_Inicial", "SURE_SET");
                    logf(SIGNIFICANT, "successfully set campo zGrupo_Inicial");
                 
            }
            
            }
    }
}

I hope you can help me

Share this post


Link to post
Share on other sites
// i hope that codeRol is defined 
if ((type == "R") && (active == 1) && (codeRol == "SOLSERRED")) {
    if (status == "OP") {
        if (is_null(zGrupo_Inicial) || is_empty(zGrupo_Inicial)) {
            send_wait(0, this, "call_attr", "zGrupo_Inicial", "set_val", group.id, "SURE_SET");
            logf(SIGNIFICANT, "%s > successfully set campo zGrupo_Inicial", persistent_id);
        } else {
            logf(SIGNIFICANT, "%s > campo zGrupo_Inicial lleno", persistent_id);
        }
    } else if (status == "RE") {
        send_wait(0, this, "call_attr", "group", "set_val", zGrupo_Inicial, "SURE_SET");
        logf(SIGNIFICANT, "%s > successfully set campo zGrupo_Inicial", persistent_id);
    }
}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...