0

is there a way to follow code execution?

I wish to follow the code execution but I have nothing to do that! I tried to put some alert("test1") inside some condition to test wich condition is trigered...but doesnt work!

How can I debug? any ideas?

6 replies

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    I do alerts... and I also have created a global function that creates entries in a log table to trace execution paths.   I pass in a string that I want to log.. 

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    my alerts wont triger... it must be something wrong...

    I have like: let atel := (select Achats) [if xxx then yyy else zzz] order by www

                         for p in atel do

                       xxxxxx

                      end

    anywhere i placed the alert it wont trig...

    what about the log? I just dont know how it works!

    • Mconneen
    • 4 yrs ago
    • Reported - view

    I am a bit confused by 

    "[if xxx then yyy else zzz]" 

    This is usually the evaluation criteria .. something like.. 

    (select Achats)[TableFieldA = ScreenField or TableFieldB = "foobar"]

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    yes, it works well with if statment inside... 

    let M := somefield

    (select Achats)[if M = x then tablefieldA = null else tablefieldA = M end and/or other condition...]

     so I can have my field for user to select a contact for exemple and then the vue will show result according to this contact only, if null it will show all contact...etc...

    • Mconneen
    • 4 yrs ago
    • Reported - view

    I forwarded this thread to Support and asked them to weigh in.. .. as this was a bit of a surprise to me.  Most of their feedback has been to "keep it simple"... set and reference variables .. as opposed to nested syntax. 

    • Sean
    • 4 yrs ago
    • Reported - view

    @Mconneen, It works, but I would personally put the select statements inside the if-then-else statement instead of this way just for clarity. To each their own I guess.

Content aside

  • 4 yrs agoLast active
  • 6Replies
  • 1207Views