AnsweredAssumed Answered

Var Break Line to Fill SDM Description

Question asked by diegojacob on Jun 14, 2018
Latest reply on Jun 19, 2018 by diegojacob

Hey guys,

 

I have two fields in an offer and I need them to be concatenated and written in the SDM ticket description with some line breaks.

 

I saw the question in the link https://communities.ca.com/thread/241784310-how-to-get-selections-from-a-selection-option-component-in-a-form but the "\n\n" code in my javascript does not put the line breaks in SDM description.

 

Here's part of the code i'm using to concatenate the value of the fields.

 

setDescription: function () {
var zNecessidade = ca_fdGetTextFieldValue(ca_fd.formId, 'necessidade');
var zJustificativa = ca_fdGetTextFieldValue(ca_fd.formId, 'justificativa');
var zDescricao = 'Descrição da necessidade: \n\n' + zNecessidade + '\n\n' + 'Justificativa: \n\n' + zJustificativa + '\n\n' + 'CHAMADO ABERTO PELA CAU - CENTRAL DE ATENDIMENTO AO USUÁRIO';
if (zNecessidade != '') {
ca_fdSetTextFieldValue(ca_fd.formId, 'ca_sdm_attr_description', zDescricao);
}
}

 

Did any of you ever have to do something like that?

 

Many thanks!!

Outcomes