Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Translating manually inputted help text

_lcrsrms_
Tera Contributor

Hi, Community.

 

We have a requirement where Company A has different help text from Company B on a Record Producer variable/field.

Can anyone assist how we can translate it? Since we want to make a dynamic helptext based on Company, can you please share your insights how we can translate it on this onChange client script?

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue === '') {
        return;
    }
    if (newValue === 'no') {
        var companyAjax = new GlideAjax('Client Callable SI);
        companyAjax.addParam('sysparm_name', 'Retrieve company SI function');
        companyAjax.addParam('sysparm_user', g_user.userID);
        companyAjax.getXMLAnswer(function(answer) {
            if (answer) {
                var answerCompany = JSON.parse(answer);
                var crossBrand = g_form.getField("is_cross_brand_position");
                crossBrand.expand_help = false;
                if (answerCompany.displayValue === 'Company A') {
                    crossBrand.instructions = "Is the position a cross brand position";
                } else {
                    crossBrand.instructions = "Is the position a cross brand position (work location different than payroll country / contract country)";
                }
                crossBrand.help_tag = "More information";
                var newCostCenter = g_form.getField("new_cost_center");
                newCostCenter.expand_help = false;
                if (answerCompany.displayValue === 'Company A') {
                    newCostCenter.instructions = "Provide the HR cost center of the associate.";
                } else {
                    newCostCenter.instructions = "<p>Please: <br>* Provide the HR cost center of the associate starting with 140. <br>* Consult finance / business control if necessary.</p>";
                }
            }
        });
    }
}

 

Since this is manually inputted help text, sys_translated_text record for translating help text is not working.

 

Thanks in advance!

0 REPLIES 0