How to get the statedisplayname in k# notification macro

Dominic Boyer asked on August 11, 2020 17:01

HI i try to get the statedisplayname from the table CMS_State in k# in a email notification. i have the stateID but cant figure out how to get the name. I was able to get the countryname with:

{% GlobalObjects.Countries.Where("CountryID = '" + countryid + "'")[0]["CountryDisplayName"]|(handlesqlinjection)false #%}

Thank you

Recent Answers


Dominic Boyer answered on August 11, 2020 17:24

i found, but i dont want te country canada static .Canada.

{%GlobalObjects.Countries.Canada.States.Where("StateID = '" + stateid + "'")[0]["StateDisplayName"] |(handlesqlinjection)false#%}

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.