Can you have conditional statements inside a randomize function call

In reply to rohit400:


 task run_phase(uvm_phase phase);
        phase.raise_objection(this);
 
        //random settings
        foreach(cfg_per_pipe[i]) begin
            if (!cfg_per_pipe[i].randomize() with {
                    UPDATE_SAMPLE_RATE_COUNT_EN == 0;
                    SAMPLE_RATE_COUNT_EN_2 == 0;
                    SAMPLE_RATE_COUNT_EN_1 == 0;
 
                    if(`DC__NUM1 != `DC__NUM2 ) {
                      //fixed pipe setting
                      var_SOURCE_SELECT                      == i;
                    }
                
                }) `uvm_fatal(get_name(), $sformatf("cfg_per_pipe[%0d] randomization failed", i))
        end