0

I want to display the whole adress not only country .

    const columns = [ 
      {label: 'Nom du compte', fieldName: 'recordId', type: 'url', typeAttributes: { label: 
    {fieldName:'Name'}, tooltip:{fieldName:'Name'}, target: '_parent'}},
    {label: 'Type de compte', fieldName: 'Type', type: 'text'},
    {label: 'Adresse', fieldName: 'ShippingCountry' , type: 'text'},
    {label: 'Téléphone', fieldName: 'Phone', type: 'phone'},

     {label: 'Site-Web', fieldName: 'Website', type: 'url', typeAttributes: { target: 
  '_parent'}},
    {label: 'Industrie', fieldName: 'Industry', type: 'text'},

  {label: 'Propriétaire du compte', fieldName: 'OwnerId', type: 'url', typeAttributes: { 
label:{fieldName:'OwnerName'}, tooltip:{fieldName:'OwnerName'}, target: '_parent'}},

  ];

2 Answers 2

3

You can add the additional address fields to your columns array and display them too: ShippingStreet, ShippingCity, ShippingState and ShippingPostalCode. Alternatively, you could string them together in a separate property, and display them as a whole under one column using that custom property.

6
  • I didn't get it ! can u please provide an example of a code
    – Oumaima
    May 6, 2020 at 15:06
  • {label: 'Street', fieldName: 'ShippingStreet' , type: 'text'},{label: 'City', fieldName: 'ShippingCity' , type: 'text'}, {label: 'State', fieldName: 'ShippingState' , type: 'text'}, {label: 'Country', fieldName: 'ShippingCountry' , type: 'text'}, {label: 'Zipcode', fieldName: 'ShippingPostalCode' , type: 'text'}
    – EranV
    May 6, 2020 at 15:15
  • But I want them all in same column
    – Oumaima
    May 6, 2020 at 15:23
  • 1
    +1. @Oumaima you will need to concatenate these fields into one in the wired handler method. May 6, 2020 at 15:26
  • can u provide a code example please!
    – Oumaima
    May 6, 2020 at 15:34
2

I ve used created a custom formula

Data Type Formula
IF(ISBLANK( ShippingStreet),'', ShippingStreet )& IF(ISBLANk(ShippingCity),'',IF(AND(ISBLANK(ShippingState),ISBLANK(ShippingPostalCode),ISBLANK(ShippingCountry)),ShippingCity,ShippingCity&","))& IF(ISBLANK( ShippingState),'',ShippingState&" ")& IF(ISBLANK(ShippingPostalCode),'',ShippingPostalCode )& IF(ISBLANK(ShippingCountry),'',IF(ISBLANK(ShippingPostalCode), ShippingCountry,ShippingCountry))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .