Tinderbox Meetup - Saturday 4 May

A simple function to create all your user attributes:

function createUserAttributes_db(theAttributes){
	theAttributes.each(anAttr){
		var myList = anAttr.split(":");
		createAttribute(myList[0], myList[1]);
	};
};

use it like:

createUserAttributes_db("AssignPrototype:string;AttributeName:string;DefaultPrototype:string;DoDebugLog:boolean;HeadingLevel:dictionary;SelectPrototype:dictionary;");

You could use this function to store all you user attributes in a note, copy it to a new file and pass the content to the first function:

function getAllUserAttributes_db(){
	var vAttrList = document["user-attributes"];
	$Text = vAttrList;
	vAttrList.each(anAttr){
		var vAttrKeys = attribute(anAttr)["type"];
		$Text = $Text + anAttr + ":" + vAttrKeys + ";";
	};
};

just an idea :wink:

4 Likes