Source language: Translate to:

Ifex doesn't work like i want

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Ifex doesn't work like i want

Postby fieldhopper » Wed Oct 29, 2014 3:51 am

That is the code:
Code: Select all
            Ifex "[zt_giltab]<=[tagesdatumzahl] AND [zt_giltbis] > [tagesdatumzahl]"
                 dbpNext "LEP" "[zschulnr]"
            else
                 If "[zt_giltbis]" "=" "0"
                    dbpNext "LEP" "[zschulnr]"
                 else
                    dbpDeleteRecord "LEP" "[zschulnr]"
                 endif
            endif


Contents of fields:

[tagesdatumzahl] = 42217
[zt_giltab] = 41852
[zt_giltbis] = 42947

On the basis of this contents it should be dbpNext, but the way is the next command If "[zt_giltbis]" "=" "0".

WHY :( .
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Ifex doesn't work like i want

Postby dec » Wed Oct 29, 2014 5:31 am

Hello,

I try your code and works like you expected, that is, executing this code:

Code: Select all
SetVar "[zt_giltab]" "41852"
SetVar "[zt_giltbis]" "42947"
SetVar "[tagesdatumzahl]" "42217"

IfEx "[zt_giltab] <= [tagesdatumzahl] AND [zt_giltbis] > [tagesdatumzahl]"
  AlertBox "Step 1" "Step 1"
Else
  If "[zt_giltbis]" "=" "0"
    AlertBox "Step 2" "Step 2"
  Else
    AlertBox "Step 3" "Step 3"
  EndIf
EndIf


... cause that the "Step 1" alertbox appear. Then, are you sure the variables contains the appropiate values? Something else in your own code (around the extract you shown) can cause the "problem"?
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Ifex doesn't work like i want

Postby fieldhopper » Thu Oct 30, 2014 1:08 am

THX for your help. You have shown me the right way. The mistake is before this code. I found and i'm lucky.

Thanks a lot for your help.
Regards fieldhopper

____________________________________________________
Es sind schon viele erfroren, aber noch keiner ist ermieft.
____________________________________________________
User avatar
fieldhopper
 
Posts: 121
Joined: Sun Mar 09, 2008 11:39 am
Location: Germany

Re: Ifex doesn't work like i want

Postby dec » Thu Oct 30, 2014 1:14 am

Hello,

fieldhopper wrote:THX for your help. You have shown me the right way. The mistake is before this code. I found and i'm lucky.

Thanks a lot for your help.


You're welcome!
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests