Welcome, Guest. Please Login or Register.
eccoMAGIC Forums
03/28/24 at 08:51:18
Home Help Search Login Register


Pages: 1
Send Topic Print
  Rating
Rate:
Rating:
Rating: 9.00
Votes: 2

5
4
3
2
1









2


5
4
3
2
1


1


2


3


4


5


6


7


8


9


10

Duplicate Popup Value to a Check-mark Folder (Popularity: 5600 )
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Duplicate Popup Value to a Check-mark Folder
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:
 
++: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
Back to top
 
 
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: Duplicate Popup Value to a Check-mark Folder
Reply #1 - 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.....
 
 
Enjoy!
 
 
 Shocked
Back to top
 

The Administrator.
WWW   IP Logged
Pages: 1
Send Topic Print