Page 1 of 1

$nuHash in BeforeSave

Posted: Sat Feb 14, 2015 4:02 pm
by OLMGBG
Hi all,
I'm experiencing nubuilderpro and I've got some issues with $nuHash while writing some validation code in BeforeSave section.
All I can see is that the array obtained from nuSubFormArray() seems to be empty... can't see what I'm doing wrong, hope you'll help....
I have a form named 'rf_user' in which I have a sub form 'ev_temps_subform'. the first column is a field names 'F_USERID'
the code :
$arr = nuSubformArray('ev_temps_subform');
for ($idx = 0 ; $idx < count($arr)-1 ;$idx++){
$v .= $idx+1 .' ' .$arr[$idx];
}
nuDisplayError('Tableau Element : '.$v.'---');
return;

gives this :
1 : 1 ev_temps_subform0001 2 ev_temps_subform0002....
the number of items seems to fit the number of lines of my subform.
but when I try to get one of the values with a code like this :
$arr = nuSubformArray('ev_temps_subform');
for ($idx = 0 ; $idx < count($arr)-1 ;$idx++){
$v1 .= $nuHash['ev_temp_subform0001F_USERID'];
// tried all the syntaxes I found evrywhere like $nuHash[$arr.idx.'F_USERID'] or $nuHash[$arr[idx]].'F_USERID] ....
}
nuDisplayError('Tableau Element : '.$v1.'---');
return;
I get something like that :
Tableau Element : ---

(Wampserver installation)
Thanks,
OLM.

Re: $nuHash in BeforeSave

Posted: Sun Feb 15, 2015 11:56 pm
by admin
OLM,

There was a bug but its fixed as of today.

So you can do a pull from github.

Steven

Re: $nuHash in BeforeSave

Posted: Mon Feb 16, 2015 10:52 am
by OLMGBG
Thanks for your quick reply...
I've never been to Github, using this link to install...: https://www.nubuilder.net/downloads.php
Have you already written a sort of tuto to get updated files from Github ?
Have a nice day too.

Re: $nuHash in BeforeSave

Posted: Fri Feb 20, 2015 5:05 am
by admin
OLMGBG,

Does this help you?

https://www.nubuilder.net/downloads.php

Steven