'cfNomAnnexe' is assigned a value but never used

hello community,

i hava create those 9 var and trying to change it’s value inside PostAnnexeBody but i receive this error for all the vars is assigned a value but never used.

  let cfNomAnnexe = `cf_${PostNomAnnexeField.field.internal_name}`;
  let cfAdress1 = `cf_${PostAnnexeAdress1Field.field.internal_name}`;
  let cfAdress2 = `cf_${PostAnnexeAdress2Field.field.internal_name}`;
  let cdAdress3 = `cf_${PostAnnexeAdress3Field.field.internal_name}`;
  let cfCodePostal = `cf_${PostAnnexeCodePostalField.field.internal_name}`;
  let cfVillee = `cf_${PostAnnexeVilleField.field.internal_name}`;
  let cfPays = `cf_${PostAnnexePaysField.field.internal_name}`;
  let cfEmail = `cf_${PostAnnexeEmailField.field.internal_name}`;
  let cfTelephone = `cf_${PostAnnexeTelephoneField.field.internal_name}`;
  // body for fields modification
  let PostAnnexeBody = {
    sales_account: {
      custom_field: {
        cfNomAnnexe: values.nom_annexe,
        cfAdress1: values.adresse_annex_1,
        cfAdress2: values.adresse_annex_2,
        cfAdress3: values.adresse_annex_3,
        cfCodePostal: values.adresse_code_postal,
        cfVillee: values.adresse_vill,
        cfPays: values.adresse_pays,
        cfEmail: values.adresse_email,
        cfTelephone: values.adresse_tel,

Hi @mehdi ,


Based on your script, it seems that you have declared some variables and assigned values to them, but they have not yet been used anywhere.

Even within the PostAnnexeBody, you have used different values than the ones you declared above. That’s likely the reason you received an error for assigning a value but never using it.

I hope this gives you the answer. If not, could you please share more details like what you are trying to do and what error message you received, and when?

It would be great if you could share some screenshots or video grabs.

Thank you.