0

Sample printTable with Filter Criteria

Somethin don't work in this script on the botton.

When change the criteria, and press the button It doesn't show me the selected criteria, but when click again yes it show me the criteria.

do as server
    let x := 'Date Start';
    let y := 'Date Finish';
    (select 'AUDIT Plan').('To Print' := false);
    for i in select 'AUDIT Plan' where 'RE-Schedule Date' >= x and 'RE-Schedule Date' <= y do
        i.('To Print' := true)
    end
end;
printTable("Audit Plan", "Print Re-Schedule Audits")

7 replies

null
    • Mel_Charles
    • 1 mth ago
    • Reported - view

    I copied your script created your data/info

    Had no issue with the button itself but it just ignored the script to update "to Print" until I changed false and true to 1 and 2. then had no issue.

    do as server
        let x := 'Date Start';
        let y := 'Date Finish';
        (select 'AUDIT Plan').('To Print' := 1);
        for i in select 'AUDIT Plan' where 'RE-Schedule Date' >= x and 'RE-Schedule Date' <= y do
            i.('To Print' := 2)
        end
    end;
    printTable("Audit Plan", "Print Re-Schedule Audits")
      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 mth ago
      • Reported - view

       

      Thanks Mel, I already saw the problem in Web Cloud it works, but not in App. 馃様 I usually work more in App than in Web.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 mth ago
      • Reported - view

       Hi Mel

      I spoke ahead of time. It doesn't work in app or public web. 馃槥

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 mth ago
      • Reported - view

       

      Ok find the solution, now yes work. Simple eliminate the do as server

      let x := 'Date Start';
      let y := 'Date Finish';
      (select 'AUDIT Plan').('To Print' := false);
      for i in select 'AUDIT Plan' where 'RE-Schedule Date' >= x and 'RE-Schedule Date' <= y do
          i.('To Print' := true)
      end;
      printTable("Audit Plan", "Print Re-Schedule Audits")
      
      • Mel_Charles
      • 1 mth ago
      • Reported - view

       Don't you just love all those little Ninox Quirks 馃槃

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 mth ago
      • Reported - view

       馃

      • Mel_Charles
      • 1 mth ago
      • Reported - view

       Just to conifirmm - works on cloud(web) perfectly too.

Content aside

  • 1 mth agoLast active
  • 7Replies
  • 61Views
  • 3 Following