Let's assume that I have Custom Table named Possible URL target parameters with code name xyz.PossibleTargets with 2 columns:
Explanation and Value.
How to feed drop-down field on page type with data to have Value (from table) as Value and Explanation as name in drop-down?
What I already tried and it is not working:Generate value;name pairs divided by newline and place it as List of options:z = ""; foreach (x in CMSContext.Current.GlobalObjects.CustomTables["xyz.PossibleTargets"].Items) {z += x.GetValue("Value"); z +=";"; z += x.GetValue("Explanation"); z += "\n" }; return z;Validator do no allow me to do such trick.Set option Macro expression and provide enumerable object:CMSContext.Current.GlobalObjects.CustomTables["xyz.PossibleTargets"].ItemsIn Item transformation: {%Explanation%} and in Value column {%TargetValue%}.This do not work also.Dropdown configurationHow to do this correctly? Documentation and hints on the fields are not helpful.Kentico v11.0.26
↧