How to get field value of document in alternate layout using macro

Aniket Pudale asked on March 8, 2017 07:26

Hi I am using Alternative forms-> layouts to show edit form to user. There are some form fields i want to show depending on other fields value. I am using {% CurrentDocument.GetValue("ItemID") #%} to get field value of current document, but it's not working. is there any way to access form fields in layouts using macros.

Recent Answers


benyamin jain answered on March 8, 2017 07:52 (last edited on December 10, 2019 02:30)

HI

you can use {%EditedObject.YourFieldName|(identity)GlobalAdministrator%} in your custom design.

but if you like to access field value in visibility or enable condition you can use {FieldName.Value}

0 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on March 8, 2017 09:48

  1. If it's about accessing a value then you could use {%FieldName%} to access value of any field.

  2. In order to show/hide that value based on some other value you may have to think writing conditional statements using macros - Kentico Macros

0 votesVote for this answer Mark as a Correct answer

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