Hi,
I'm building a "Procedure" and I'm using "$formValue" to get the value of the form field.
But it does not work. Any idea why?
Thank you for the support.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Procedure: get value from FORM
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Procedure: get value from FORM
Rui,
from wiki:
In selection form you should have, for example, an object with "my_obj" in All tab > Field Name.
In your procedure code you should have:
Hope this helps,
Max
from wiki:
.$formValue
This is an array of the Variables from the selection Form, created prior to running an activity
In selection form you should have, for example, an object with "my_obj" in All tab > Field Name.
In your procedure code you should have:
Code: Select all
$value = $formValue['my_obj'];
Max
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
Re: Procedure: get value from FORM
Hi,
$formValue works in report Data Code.
In Procedure u have to pass values with runIt function
e.g. runIt("pcode","val1","val2","val3")
and catch the values in Procedure PHP Code
$var1 = "#runIt1#";
$var2 = "#runIt2#";
$var3 = "#runIt3#";
http://wiki.nubuilder.com/tiki-index.ph ... nIt_pCode_
zazzium
$formValue works in report Data Code.
In Procedure u have to pass values with runIt function
e.g. runIt("pcode","val1","val2","val3")
and catch the values in Procedure PHP Code
$var1 = "#runIt1#";
$var2 = "#runIt2#";
$var3 = "#runIt3#";
http://wiki.nubuilder.com/tiki-index.ph ... nIt_pCode_
zazzium
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Procedure: get value from FORM
Rui, zazzium is right: sorry I misunderstood what you wrote.
zazzium, thanks for correcting me.
zazzium, thanks for correcting me.
-
- Posts: 177
- Joined: Tue Nov 15, 2011 2:24 pm
Re: Procedure: get value from FORM
Hi,
Thanks!
I have this procedure with a filed: and I need to scan a asset tag (with a hand scanner with "return carriage").
After scan I need the the procedure to "run" (open the new window and close it when if finishes). The "Asset field" has then to be empty and ready to accept a new value.
Any advice?
Thank you.
Thanks!
I have this procedure with a filed: and I need to scan a asset tag (with a hand scanner with "return carriage").
After scan I need the the procedure to "run" (open the new window and close it when if finishes). The "Asset field" has then to be empty and ready to accept a new value.
Any advice?
Thank you.
BR
Rui
Rui
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
Re: Procedure: get value from FORM
Hi,
if u want a button, use "Extra Action Buttons" on the form.
add button title and "Javascript to run";
where procedureCode is obviously procedure code and
$("#fieldName").val() fieldName is the fields name u need to pass to procedure.
pic:
http://prntscr.com/1m4f7y
in Procedure PHP Code:
pic:
http://prntscr.com/1m4dk4
but u could activate the runIt() function automatically when the required field gets the value from the scanner with javascript.
hope it makes sense
zazzium
if u want a button, use "Extra Action Buttons" on the form.
add button title and "Javascript to run";
Code: Select all
runIt("procedureCode",$("#fieldName").val());
$("#fieldName").val(''); //clear the field for the next scan
$("#fieldName").val() fieldName is the fields name u need to pass to procedure.
pic:
http://prntscr.com/1m4f7y
in Procedure PHP Code:
Code: Select all
$var = '#runIt1#';
//do your stuff
echo "<html><body onload='window.close()'></body></html>";
http://prntscr.com/1m4dk4
but u could activate the runIt() function automatically when the required field gets the value from the scanner with javascript.
hope it makes sense
zazzium
-
- Posts: 177
- Joined: Tue Nov 15, 2011 2:24 pm
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact: