|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Wed Sep 19, 2012 11:15 pm
something not quite working |
ok got an alias
value is
#if (%ismember( @clist1, @symptom)) {7} {#if (%ismember( @clist2, @symptom)) {6} {#if (%ismember( @clist3, @symptom)) {#SEND %db( @HealDB, %i)} {noop}}}
got three string lists each with conditions in - obviously im trying to match conditions in eack list to a syptom variable
Help please |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu Sep 20, 2012 12:26 am |
you have it backwords
%ismember(petitioner, @list) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Thu Sep 20, 2012 1:27 am |
Thanks - changed it around but still not working
alias test
value
#if (%ismember( @symptom, @Dlist1)) {7} {#if (%ismember( @symptom, @list2)) {6} {#if (%ismember( @sympton, @list3)) {#SEND %db( @HerbDB, %i)} {noop}}}
so to test i put value testv into @symptom
I also put testv|testa|testb|testc into @list3
then put
testv|say v
testa|say a
testb|say b
into @HealDB
so when i enter alias test I should get a response of say v but its not happening - have been trying to get it right for few days but i am not understanding it that well - any ideas
sorry to be such a basic newbie but am trying |
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Thu Sep 20, 2012 1:28 am |
sorry i have a spell mistake it is list1 not dlist1 but it still doesnt work
|
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Thu Sep 20, 2012 3:14 pm |
tried another way also
#forall @symptom {#if %ismember( %i, @list1) {match={7}} {#if %ismember( %i, @list2)} {match={6}} {#if %ismember( %i, @list3) {match=SEND %db( @HerbDB, %i)}}}
Nothing still not happening - not sure what to try now |
|
|
|
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
Posted: Thu Sep 20, 2012 5:40 pm |
ok i solved like this not sure if its the best way but at least it works
#if (%numitems( @list1)>0) {#FOR @list1 {#SEND %db( @HerbDB, %i)}} {#IF (%numitems( @list2)>0) {#FOR @list2 {#SEND %db( @HerbDB, %i)}} {#IF (%numitems( @list3)>0) {#FOR @list3 {#SEND %db( @HerbDB, %i)}}}} |
|
|
|
|
|