Getting JSDoc data of a caclulated field in runtime

Hi

Is het possible to get JSDoc data of a calculated field at runtime.
For superuser we have a datamodel solution, where the get information about all the tables and fields. It also show the description we typed in at a particular field.
But for calculated field we do not have that. Although we have a the info in the JSDoc.
Is there a way to get this JSDoc info of calculated field on runtime.

Thanks for your help
Andre

Hi Andre,

something like this should do the job:

	var _sResult = null;
	
	var _jsDs = solutionModel.getDataSourceNode('db:/<DB_NAME>/<TABLE_NAME>');
	
	if(_jsDs) {
		var _jsCalc = _jsDs.getCalculation('<CALC_NAME>');
		if(_jsCalc) {
			var _sCode = _jsCalc.code;
			var _aMatch = _sCode.match(/\/\*\*([\s\S]*?)\*\//);
			
			if(_aMatch && _aMatch.length) {
				_sResult = _aMatch[0].replace(/@properties.*(\r?\n|$)/g, '');
			}
		}
	}
	
	return _sResult;

Thanks Marc,
Just what I needed. So you learn everyday. :-)
Andre