Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Triggering $shell question, posted by Steve Jones on Wed Apr 5 20:25:42 2006 
    icon2.gif   Re: Triggering Re: Triggering $shell question, posted by Steve Jones on Wed Apr 5 22:48:49 2006 
Message ID: 1796     Entry time: Wed Apr 5 20:25:42 2006     Reply to this: 1797
Icon: Question  Author: Steve Jones  Author Email: steve.jones@freescale.com 
Category: Question  OS: All  ELOG Version: 2.6.1-1684 
Subject: Triggering $shell question 
Should this work? rev1684 now allows $shell to pass attribute contents to the shell command and whenever a new entry is submitted or when one Edits/Replys the Subst is triggered, but I would like to be able to trigger this whenever a new value in the options pulldown is selected (assume Risk2 and Risk3 are identical to Risk1). Being able to trigger a regular Preset works fine (like {1} preset Date = $date ) but I would like to trigger the Subst. Maybe a better question, what actions (Subst, Preset, Change, Execute, etc.) I've tried Subst and Preset but not much luck.

##################################################
# Define Risk1
#
Options Risk1 = 10{30}, 20{31}, 30{32}, 40{33}, 50{34}, 60{35}, 70{36}, 80{37}, 90{38}, 100{39} 
{30,31,32,33,34,35,36,37,38,39} Subst TotalRisk = $shell(gawk 'BEGIN{ print $Risk1 + $Risk2 + $Risk3 }' )

ELOG V3.1.5-fe60aaf