set_folder_value(folder_name,item_id,value)


Description

Sets the value into the named folder (folder_name) associated with the specified item.

Example

set_folder_value("Release",item_id,"3.6.5.0.0")
Sets the value of the Release folder for the current item to 3.6.5.0.0.

wc=0.
for word in string.gmatch(get_item_text(item_id),"%a+") do
wc=wc+1
-- msgbox(word,"")
end
count=tostring(wc)
set_folder_value("C",item_id,count)

This routine counts the number of words in the item text of the current item.
wc is the word count and is initially set to zero and later incremented by 1 as the for loop steps through each word of the item text.
The for loop uses the string.gmatch() function to match each entire word in the string, in this case the get_item_text() ecco lua command.

Related Rules

get_folder_value()

Rules