The eccoMAGIC Forums
the SLANG EXTENSION and Guest Programming >> Slang Rules Scripts, Functions, Examples and HOW TO >> Duplicate Popup Value to a Check-mark Folder

Message started by rb on 03/09/10 at 15:45:59

Title: Duplicate Popup Value to a Check-mark Folder
Post by rb on 03/09/10 at 15:45:59

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:


6. How it works:
A. When you set the popup value, the corresponding check-mark folder will be

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

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)
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

Title: Re: Duplicate Popup Value to a Check-mark Folder
Post by Admin on 05/13/17 at 14:04:42

In the latest version of the Slang extension,  this feature is now bi-directional and built-in!

Copy the sample linked folder to any ecco file and adjust for your needs.

Make sure you have the sub-folder names listed as pop-up values in the parent folder.

Beyond that... it works automatically.....



The eccoMAGIC Forums » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.