Re: REQUEST: Easy script to show number of TLI's in folder?
David Chilcott <drc-MSorM6SaYm4Aspv4Qr0y0gC/[email protected]>
| Newsgroups | gmane.comp.windows.eccopro |
|---|---|
| Message-ID | <CAHii2uKN0kLptCzLDg-N6EAKzdch-LLAiRMeJ4Xv-DUZotdg3w@mail.gmail.com> |
Many THANKS JS! Awesome... I'll get a chance to noodle with the scripting this weekend. BTW, which other Ecco forum should I check out? D ;-) David Chilcott Outformations, Inc. Keep Breathing. Tell the Truth. Be Fearless. Choose Love. Embrace the Mystery. --------------------------------------------------------------------------- Email: drc-MSorM6SaYm4Aspv4Qr0y0gC/[email protected] Voice: 510.655.7122 Skype: DavidChilcott Twitter: @DavidChilcott Facebook: www.facebook.com/DavidRChilcott LinkedIn: www.linkedin.com/in/DavidChilcott Schedule a meeting with me at: *http://meetme.so/DavidChilcott <http://meetme.so/DavidChilcott>* Need to contact me URGENTLY? Use https://awayfind.com/DavidChilcott ---------------------------------------------------------------------------- Ask me about the Outformations Agile Enterprise JumpStart http://bit.ly/AgileJumpStart ---------------------------------------------------------------------------- On Wed, Mar 12, 2014 at 1:54 PM, JS <[email protected]> wrote: > > > There is no such function as get_folder_items(folder_id), therefore > You need to take all TLI - get_tli_items() and > check each TLI on whether it belongs to the folder - > get_folder_value(item_id, folder_id) > count the results > record them into a certain item (regretfully, there is no function that > can replace a part of the item text, so you need to replace it all). > > You can start the script manually, on file startup, by timer, or as an > autoassign rule; in the latter case it will run each time you change an > item in your file, but that's ok. > > Try to put the following as a rule into whatever folder. You will need to > put in the script your_item_id, you may know it by selecting the item and > running in the Expression Evaluator display(item_id). You may try the > script in the Evaluator first, then you do not need the first line > (starting with++). Do not forget to back up you data before playing with > scripts. > > ++:L:/*value*/:/*condition*/ > > function get_folder_tli_items(folder) > --this function will returns all TLIs from a given folder (id or > name) > --12 March 2014 > t=get_tli_items() > t_out={} > n=0 > for i,v in ipairs(t) do > if get_folder_value(folder,v) >' ' then > n=n+1 > t_out[n]=v > end --if > end --for > if n > 0 then > return t_out > end --if > return 'there is no TLI in this folder' > end --function > > a=get_folder_tli_items('Today') > your_item_id= > set_item_text(your_item_id, 'TLI Count= '..#a..' <- - your text here' > > By the way, such questions are more suitable for another group, maybe you > will get more responses there. > > > *From:* David Chilcott <drc-MSorM6SaYm4Aspv4Qr0y0gC/[email protected]> > *Sent:* Tuesday, 11 March, 2014 18:41 > *To:* [email protected] > *Subject:* [eccopro] REQUEST: Easy script to show number of TLI's in > folder? > > > I'd like to implement some WIP limits for folders which would be helped > by having a calculated > text item (at the top for example) that shows the number of Top Level > Items in that folder > > [image: Inline image 1] > > Is there anyone with pointers to how this might be scripted? > > D ;-) > > David Chilcott > Outformations, Inc. > > Keep Breathing. Tell the Truth. Be Fearless. Choose Love. Embrace the > Mystery. > --------------------------------------------------------------------------- > Email: drc-MSorM6SaYm4Aspv4Qr0y0gC/[email protected] > Voice: 510.655.7122 > Skype: DavidChilcott > Twitter: @DavidChilcott > Facebook: www.facebook.com/DavidRChilcott<http://x.jmxded26.net/y.z?l=http%3a%2f%2fwww.facebook.com%2fDavidRChilcott&r=3761341306&d=303494&p=1&t=h> > > LinkedIn: www.linkedin.com/in/DavidChilcott<http://x.jmxded26.net/y.z?l=http%3a%2f%2fwww.linkedin.com%2fin%2fDavidChilcott&r=3761341306&d=303494&p=1&t=h> > > Schedule a meeting with me at: *http://meetme.so/DavidChilcott > <http://x.jmxded26.net/y.z?l=http%3a%2f%2fmeetme.so%2fDavidChilcott&r=3761341306&d=303494&p=1&t=h>* > > Need to contact me URGENTLY? Use https://awayfind.com/DavidChilcott<http://x.jmxded26.net/y.z?l=https%3a%2f%2fawayfind.com%2fDavidChilcott&r=3761341306&d=303494&p=1&t=h> > > ---------------------------------------------------------------------------- > Ask me about the Outformations Agile Enterprise JumpStart > http://bit.ly/AgileJumpStart<http://x.jmxded26.net/y.z?l=http%3a%2f%2fbit.ly%2fAgileJumpStart&r=3761341306&d=303494&p=1&t=h> > > ---------------------------------------------------------------------------- > > > > >
image.png
(image/png, 8.1 KB) - not displayed