whats the number of times the letter h appears in:
q: get recordtypeid before wire functions run so im trying to get the picklist values based on 2 record type ids for the account object. everything works just fine, but the thing that bothers me is that i have to hard-code the record type ids.
@wire(getpicklistvaluesbyrecordtype, { objectapiname: account_object, recordtypeid: 012250000009xyoaau })
wiredvalues({ data }){
    if(data){
        this.mhbkbranchvalues = [];
        data.picklistfieldvalues.branch__c.values.foreach(
            element => this.mhbkbranchvalues.push({
                label: element.label,
                value: element.value
            })
        );
        console.log(mhbkbranchvalues, this.mhbkbranchvalues);
        this.mergepicklistvalues();
    } 
}

//shared
@wire(getpicklistvaluesbyrecordtype, { objectapiname: account_object, recordtypeid: 012250000009xypaau })
wiredvalues2({ data }){
    if(data){
        this.sharedbranchvalues = [];
        data.picklistfieldvalues.branch__c.values.foreach(
            element => this.sharedbranchvalues.push({
                label: element.label,
                value: element.value
            })
        );
        console.log(sharedbranchvalues, this.sharedbranchvalues);
        this.mergepicklistvalues();
    } 
}

mergepicklistvalues(){
    if(this.mhbkbranchvalues && this.sharedbranchvalues){
        this.branchoptions = this.mhbkbranchvalues;
        this.sharedbranchvalues.foreach(
            element => {
                if(this.branchoptions.filter(e => e.label === element.label).length > 0){
                    console.log(existing value);
                } else {
                    this.branchoptions.push({
                        label: element.label,
                        value: element.value
                    });
                }
            }
        );
    }
    console.log(branch info , this.branchoptions);
}

i also tried getting the record type id using getobjectinfo, but the problem is the values are undefined when the 2 picklist wire functions are run.
@wire(getobjectinfo, { objectapiname: account_object })
wiredaccdata({data}){
    if(data){
        console.log(data);
        const rtis = data.recordtypeinfos;
        this.mhbkrtid = object.keys(rtis).find(rti => rtis[rti].name === mhbk);
        this.sharedrtid = object.keys(rtis).find(rti => rtis[rti].name === shared);
        console.log(this.mhbkrtid, this.sharedrtid);
    }
}

is there a way of achieving this?
later edit:
my code now looks like this:
mhbkrtid;
sharedrtid;

@wire(getobjectinfo, { objectapiname: account_object })
wiredaccdata({data}){
    console.log(obj, data);
    if(data){
        console.log(obj data, data);
        const rtis = data.recordtypeinfos;
        this.mhbkrtid = object.keys(rtis).find(rti => rtis[rti].name === mhbk);
        this.sharedrtid = object.keys(rtis).find(rti => rtis[rti].name === shared);
        console.log(rt ids, this.mhbkrtid, this.sharedrtid);
    }
}

//mhbk
@wire(getpicklistvaluesbyrecordtype, { objectapiname: account_object, recordtypeid: $this.mhbkrtid })
wiredvalues({ data }){
    console.log(mhbk, data);
    if(data){
        this.mhbkbranchvalues = [];
        data.picklistfieldvalues.branch__c.values.foreach(
            element => this.mhbkbranchvalues.push({
                label: element.label,
                value: element.value
            })
        );
        console.log(mhbkbranchvalues, this.mhbkbranchvalues);
        this.mergepicklistvalues();
    } 
}

//shared
@wire(getpicklistvaluesbyrecordtype, { objectapiname: account_object, recordtypeid: $this.sharedrtid })
wiredvalues2({ data }){
    console.log(shared, data);
    if(data){
        this.sharedbranchvalues = [];
        data.picklistfieldvalues.branch__c.values.foreach(
            element => this.sharedbranchvalues.push({
                label: element.label,
                value: element.value
            })
        );
        console.log(sharedbranchvalues, this.sharedbranchvalues);
        this.mergepicklistvalues();
    } 
}

as you can see there are multiple debugs and this is what my console looks like:

the getobjectinfo is re-evaluated and retrieves the values, but it doesnt re-evaluates the other 2 wire functions. the debugs under the red line are from a different wire function and from connectedcallback.

user
There are one hundred and forty-four "h"s.
assistant