He estado probando un poco más a fundo javascript en v7, y he echo el seguiente proceso:
var table_name = theRoot.varToString( "TABLE_NAME" ); var theMainProject = theApp.mainProjectInfo(); if ( theMainProject ) { for( var nIndex=0; nIndex < theMainProject.allTableCount(); nIndex++ ) { var tableInfo = theMainProject.allTableInfo( nIndex ); if ( tableInfo ) { if (tableInfo.id() == table_name) {break;} } } } theRoot.setVar( "TABLE_ID", ''+nIndex );
La pregunta es, existe forma de obtener el identificador numerico de la tabla usando su identificador alfabetico, sin tener que recorrer todas las tablas del proyecto?
O sea que le pasemos el nombre(identificador) de la tabla y nos devuelva el id numerico de las misma?