how i will fetch field's dataType, length(if field is Text type), label and helpText from Object in javascript skuid

  • 1
  • Question
  • Updated 3 years ago
  • Answered
how i will fetch field's dataType, length(if field is Text type), label and helpText from Object in javascript skuid
Photo of paras jain

paras jain

  • 264 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
You can use skuid.model.Model.getField() to get field metadata. All four of the things you mentioned are included, but here is the full list.
Photo of paras jain

paras jain

  • 264 Points 250 badge 2x thumb
i am fetching
 var vt=  skuid.model.Model.getField(take_priority__c); 
  alert('>>>>>>>>>>>>>>>'+vt);

Not working....

Also
var vt=  skuid.model.ContFlds.getField(take_priority__c);    alert('>>>>>>>>>>>>>>>'+vt);
ContFlds- my model name
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
This syntax will give you the field metadata object. 

skuid.model.getModel('ModelName').getField('FieldName')
Photo of paras jain

paras jain

  • 264 Points 250 badge 2x thumb
Can you share me the links of good code stuff of skuid...i am new in skuid...
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb