Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findReCollectionIds(reModelId) {
- var reCollectionIds = [];
- var gr = new SimpleRecord('sys_re_model_collection');
- gr.addQuery('re_model_id', reModelId);
- gr.query();
- while (gr.next()) {
- reCollectionIds.push(gr.getValue('re_collection_id'));
- }
- reCollectionIds.push(reModelId);
- return reCollectionIds;
- }
- function findColumnNamesByReContainerIds(reContainerIds) {
- var columnNames = [];
- var gr = new SimpleRecord('sys_re_attribute');
- gr.addQuery('re_container_id', 'IN', reContainerIds);
- gr.query();
- while (gr.next()) {
- columnNames.push(gr.getValue('column_name'));
- }
- return columnNames;
- }
- function getColumnNamesByReModelId(reModelId) {
- var reCollectionIds = findReCollectionIds(reModelId);
- return findColumnNamesByReContainerIds(reCollectionIds);
- }
- const reModelId = '172121150506068425';
- const columnNames = getColumnNamesByReModelId(reModelId);
- ss.info(columnNames);
Advertisement
Add Comment
Please, Sign In to add comment