Page 1 of 1

Run procedure outside Nubuilder

PostPosted: Mon Jun 17, 2013 6:26 pm
by ruiascensao
Hi,

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

Thanks!

BR
Rui

Re: Run procedure outside Nubuilder

PostPosted: Tue Jun 18, 2013 5:03 pm
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

PostPosted: Fri Oct 25, 2013 9:48 am
by admin
Sounds dangerous

Steven

Re: Run procedure outside Nubuilder

PostPosted: Fri Feb 20, 2015 9:19 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.