Page 1 of 1

Use PMFSendVariables() to Send variables to an existing Grid

Posted: Thu May 26, 2022 5:00 am
by Kamil123
Hello,
I'm trying to use PMFSendVariables() to Send some variables to an existing Grid but I'm facing a small issue.
When I use the below line, the existing data in the grid is totally deleted and replaced with that value!
Code: Select all
@=SetInitiatives[2]['InitiativeFlag']= "1";
@@result = PMFSendVariables(@@ApplicationUID,array('SetInitiatives' => @=SetInitiatives));
How can I set the value to the filed: "InitiativeFlag" = "1" in the grid without affecting the existing values?

Thanks

Re: Use PMFSendVariables() to Send variables to an existing Grid

Posted: Mon Jun 27, 2022 12:35 pm
by marceloayllon
Hello Kamil123


if you pass a new array there's no variable to reference, the functions used creates a new one

don't use
Code: Select all
MFSendVariables(@@ApplicationUID,array('SetInitiatives' => @=SetInitiatives));
thinking your PM array is a PHP array.

always create a PHP variable and pass it to the function
Code: Select all
  $vars = array("SetInitiatives" => @@SetInitiatives);
    PMFSendVariables(@@APPLICATION, $vars);