How to set a value (string) to all children elments in dimension with macro

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • How to set a value (string) to all children elments in dimension with macro

    Hello to everyone,

    I have a report whit 3 comboboxes (A, B, C) and one dynarange. In dynarange I see all childrenelements from combobox A.

    I need to set a value (string) from cell E11 with click on Button "Save" to all elements shown in dynarange.

    How can I get all children elements from parentelement in combobox and set this value with macro.

    I tryed this function:

    $test = application()-> PALO_ELEMENT_LIST_CHILDREN($Server,"Dimension",$comboboxA);
    application()->PALO_SETDATA('Text', 'TRUE', $Server $Cube, $comboboxB, $test , $comboboxC);

    But it works just for first element.

    I think I need to build an array and than set the value, but I'm new with php and cannot find an example for this case. Thanks for any help!

    Best regards,
    Sigita
  • Hi,

    thanks for your replay.

    I solved it:

    $test = application()-> PALO_ELEMENT_LIST_CHILDREN($Server,"Dimension",$comboboxA);
    $i=1;
    foreach($Test as $element)
    {
    application()->PALO_SETDATA('Text', 'TRUE', $Server $Cube, $comboboxB, $test , $comboboxC);
    $i++;
    }
    activesheet()->range ('G2')->value = $element;

    Best Regards