This content has been marked as final. Show 3 replies
I think your problem is this line:
I think you just need $tNG->getPrimaryKeyValue()
Also, you cannot use $_POST variables using ADDT forms. ADDT posts all form variables to the same form page, and so $_POST variables from ADDT forms are not accessible by calling $_POST['proj']
To get a value from an ADDT form variable, use the following code in the Custom Trigger:
$proj = $tNG->getColumnValue("proj");
I think you are incorrectly using $tNG->getPrimaryKeyValue() and I don't think any of your values are getting passed correctly. You probalby need to do some trouble shooting in the trigger.
Use the following code for testing:
echo "TEST D: " . $tNG>getPrimaryKeyValue("d");
echo " TEST lstatus: " . $tNG>getPrimaryKey("lstatus");
echo " TEST proj: " . $tNG>getPrimaryKeyValue($_POST['proj']);
Put this at the beginning of the trigger to see what values(if any) are generated. I'm pretty sure that one, if not all, of these variables is not being set.
Thank you Shane, I'm sorry I failed to tell everyone that I wasn't using a ADDT form from the previous page, I am just using a simple form to send the variable over to the page where the custom trigger resides. I am hoping that when the page loads that the variable is saved in the trigger and after posting the ADDT form on that page it would set the trigger off supplying the needed data.
Is my thinking wrong on this? Also, the code that you are telling me to use, should i also insert it inside the custom trigger interface?
Once again, thank you for your assistance.
You can put that code inside the trigger at the top. All this code does is echo the values you are trying to use to the browser. This will let you know if those values are being passed to the trigger.
The variable will not be saved in the trigger upon loading the page as the trigger is not even executed until the ADDT form is posted. In order to pass values to the trigger, you would have to do something else.
Put this code at the top of your ADDT form php page(inside the