rb
|
You can get the best of both worlds; Categorize by popup value and automatically add to Category check-mark folders 1. Create your Category folders as check-mark folders 2. Create a Popup Folder with the same Categories. 3. Create a text file "luacmd.lua" in the Ecco program directory. 4. Add the function/Script as shown below to "luacmd.lua" files and save (The Script lists examples of Categories - modify as desired). 5. In any folder (I have a check-mark folder called "LUA Scripts"), create the following rule: ++:L:SetCategoryFolder(item_id) 6. How it works: A. When you set the popup value, the corresponding check-mark folder will be checked. B. Changing the popup value changes the check-mark Folder. C. Note that the reverse is not working, i.e. it is not possible to change the check-mark folder to change the popup value. This can be done but it is a bit complicated. D. Thus, trying to change the check-mark Folders is prevented. It will simply revert back according to the value set in the popup folder. E. If a new item is created w/o a popup category value, the popup will get the value "Unassigned" and the Unassigned check-mark folder will be checked. F. Note that only one category/item is permitted (because only one popup value can be set) ====== Script to add to luacmd.lua ======= function SetCategoryFolder(item_id) tCategories={"Car","Computer","Duty","Education","Family","Finance","Fun", "Health","Home","Investment","JobSearch","JobDo","Legal","Tax","Make$", "Other","UnAssigned"} Category=get_folder_value("Category", item_id) if Category~="" then for index,TestCategory in ipairs(tCategories) do CurrCategory=get_folder_value("Category", item_id) if CurrCategory==TestCategory then set_folder_value(CurrCategory,item_id,1) else set_folder_value(TestCategory,item_id,0) end end else set_folder_value("UnAssigned",item_id,1) set_folder_value("Category",item_id,"UnAssigned") end
|