Page 1 of 1

Run procedure outside Nubuilder

Posted: Mon Jun 17, 2013 10:56 am
by ruiascensao
Hi,

Is it possible to run a procedure from a link outside nubuilder?

Thanks!

BR
Rui

Re: Run procedure outside Nubuilder

Posted: Tue Jun 18, 2013 9:33 am
by zazzium
i'm not sure about completely outside nubuilder,
but if the link is in runIt procedure and u want to call a new runIt from it, u could do it by
copying the JavaScript runIt() function from form.php (around line 890)

Code: Select all

function runIt(pReportID){ 
   var ExtraParameters = '';
   for(Ano = 0 ; Ano < runIt.arguments.length ; Ano++){
      ExtraParameters  = ExtraParameters + '&runIt' + Ano + '=' + runIt.arguments[Ano];
   }
 var url   = url+"runprocedure.php?x=1&dir="+customDirectory+"&ses="+session+"&form_ses="+formsessionID+"&r="+pReportID+ExtraParameters;
   window.open (url,'_blank','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes'); 
}
you need these variables:
session
formsessionID
url
customDirectory

get the formsessionID with php $_GET from the url

zazzium

Re: Run procedure outside Nubuilder

Posted: Fri Oct 25, 2013 2:18 am
by admin
Sounds dangerous

Steven

Re: Run procedure outside Nubuilder

Posted: Fri Feb 20, 2015 12:49 pm
by waleed444
I can set a default value for a new record easilly, but can't figure out how to do it on an existing record.