Dropdown list select + with if

Hello I have created a dropdownlist with 4 options.

Option1 / option2 / option 3 / options4

Now When I select Option1, I want that he automatically add the Email / phone number / title

Option1

Okesteloot@kpmg.com

0471129330

Manager

How can I do that?

If dropdown = Option1

Then email = Okesteloot@kpmg.com

phone number = 0471129330

Titel = Manager

Hi @OKesteloot1606

I have three questions regarding the dropdown list :

  1. Where do you get the data (email, phone number, title) from? Is it the Silverfin company details (text template) or another template (reconciliation template or text template that you also need to build?)

  2. Where do you want the data to appear? (text or reconciliation template?)

  3. Does the data depend on the period you are in or not?

Kind regards
Sofie

  1. Good question. For the moment its hard coded text. Do you have a suggestion?

  2. in texte Transmittal letter Accountancy

  3. Fixed data not dependent on the periods

Hi Olivier,

your code could look like this:

{% assign email = "Okesteloot@kpmg.com" %}
{% assign phone_number = "0471129330" %}
{% assign function = "Manager" %}

{% if your_dropdown_variable == "option1" %}
{{ email }}
{{ phone_number }}
{{ function }}
{% endif %}

you could always hard code your email, phone_number and function, but from coding perspective it is cleaner to assign them to variables.

Best regards,

Michiel

Hello

Can you controle the code:

{% assign email1 = "pvalckx@kpmg.com" %}

{% assign phone_number1 = “0495593358” %}

{% assign function1 = “Partner” %}

{% assign email2 = "dhusquinet@kpmg.com" %}

{% assign phone_number2 = “0478950326” %}

{% assign function2 = “Director” %}

{% assign email3 = "wmeert@kpmg.com" %}

{% assign phone_number3 = “0474984644” %}

{% assign function3 = “Director” %}

{% assign email4 = "jvaneeckhoudt@kpmg.com" %}

{% assign phone_number4 = “0476242895” %}

{% assign function4 = “Director” %}

{% if company.custom.man3.vrouw4 == “Patrick Valckx” %}

{{ phone_number1 }}

{% else if company.custom.man3.vrouw4 == “Didier Husquinet” %}

{{ phone_number2 }}

{% else if company.custom.man3.vrouw4 == “Wim Meert” %}

{{ phone_number3 }}

{% else if company.custom.man3.vrouw4 == “Joos Van Eeckhoudt” %}

{{ phone_number4 }}

{% endif %}

{% if company.custom.man3.vrouw4 == “Patrick Valckx” %}

{{ email1 }}

{% else if company.custom.man3.vrouw4 == “Didier Husquinet” %}

{{ email2 }}

{% else if company.custom.man3.vrouw4 == “Wim Meert” %}

{{ email3 }}

{% else if company.custom.man3.vrouw4 == “Joos Van Eeckhoudt” %}

{{ email4 }}

{% endif %}

Its only working for the first two not for the third and fourth? Wat is not correct?

Thx

Hi @OKesteloot1606,

You are using the wrong tag for your elsif statement. Instead of else if , please use elsif like this:

{% elsif company.custom.man3.vrouw4 == “Didier Husquinet” %}

Kind regards,
Kimberly

I need to do the same but with text visible or not. How can I do that?

{% newline %}
{% if company.custom.man5.vrouw5 == “De jaarrekening” %} (the need to be non visible. / {% if company.custom.man5.vrouw5 == “De jaarrekening en het jaarrapport” %} (the text need to be visible)

Het jaarrapport is vertrouwelijk en enkel bestemd voor het bestuursorgaan en de aandeelhouders van de vennootschap. Evenwel kan het
bestuursorgaan, in het kader van zijn financiële en/of commerciële relaties, dit jaarrapport aan derden-stakeholders overmaken. Het jaarrapport werd niet samengesteld voor de speci-fieke noden of belangen van de stakeholders en KPMG kan bijgevolg niet ga-randeren
dat het jaarrapport geschikt is voor hun doeleinden. KPMG neemt geen enkele aansprakelijkheid of zorgvuldigheidsplicht op zich voor enig verlies, schade, kost, of welke uitgave dan ook, die naar aanleiding van het gebruik van of vertrouwen op dit jaarrapport
zou veroorzaakt worden.

{% newline %}

{% newline %}

Gezien het vertrouwelijk karakter van het jaarrapport, is het de stakeholders niet toegestaan dit jaarrapport aan een derde partij
te bezorgen of hem hiertoe toe-gang te geven. Het is evenmin toegestaan dit jaarrapport te kopiëren, reprodu-ceren, citeren of er naar te refereren (geheel of gedeeltelijk) in eender welk do-cument, tenzij wanneer dit vereist is voor wettelijke of deontologische
doelein-den.

{% newline %}

{% newline %}

Voor zover toegestaan bij Belgische wet- en regelgeving, zal iedere stakehol-der/derde-gebruiker van dit rapport KPMG vergoeden en
vrijwaren tegen elke vordering of actie alsook elke dreiging daartoe gericht tegen KPMG en die ver-band houdt met het feit dat hij de hierboven gestelde bepalingen niet of niet be-hoorlijk naleefde, behalve voor zover in laatste instantie in rechte wordt geoor-deeld
dat deze vordering of actie het gevolg is van KPMG’s kwade trouw of op-zettelijke fout.

Thx

Hi @Okesteloot1606,

You can do this by putting an if-statement with the condition that needs to be fulfilled around the text you want to be visible.

{% if company.custom.man5.vrouw5 == “De jaarrekening en het jaarrapport” %}
TEXT
{% endif %}

When the condition is not fulfilled, the text will not be shown.

Kind regards,
Kimberly

Hi

Bumped into this topic by accident.
Just a suggestion. Instead of doing the if elsif and else statements multiple times, you might consider doing it like this:

{% if company.custom.man3.vrouw4 == “Patrick Valckx” %}

{{ phone_number1 }}
{{ email1 }}

{% else if company.custom.man3.vrouw4 == “Didier Husquinet” %}

{{ phone_number2 }}
{{ email2 }}

{% else if company.custom.man3.vrouw4 == “Wim Meert” %}

{{ phone_number3 }}
{{ email3 }}

{% else if company.custom.man3.vrouw4 == “Joos Van Eeckhoudt” %}

{{ phone_number4 }}
{{ email4 }}

{% endif %}