2

I created one Parameter Schema and added one text field testText, and assigned 9 as the default value for that field in schema. I have assigned this parameter schema to my TBB in CMS. Now i am trying to retrieve the value 9 in my C# TBB using below code

string validCount = package.GetValue("testText");

but i am not able to retrieve the field value what i have assigned as a default field value. It's returning me empty value.
For reference i used this question

While running the template in builder, if i am assigning the parameter value manually, code is working fine. But i need that default value what i have assigned to the field through code.
Kindly point me out if i am missing anything. I have found many questions on same topic and found same answer everywhere. but in my case i am unable to get the value using this approach.

1 Answer 1

2

I don't think that default values in Parameter Schemas actually work.

If you want default values for your TBB parameters, you should put those in your code (in case a Package item named after the parameter is not found).

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.