PHP Macro to define variable depending on user attribute

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

  • PHP Macro to define variable depending on user attribute

    Hello everyone,

    I have a code snippet where I cannot find the error and hope for any kind of hints.

    Goal: The press of a button defines a variable depending on the attribute of the user. The attribute is stored in a cell (E34) on the websheet

    Source Code

    1. function Analysis_Click ()
    2. {
    3. $value = activesheet()->range('E34')->value;
    4. if ($value = "Controlling") {
    5. define_variable("Area", "DetailAnalysis");
    6. } else {
    7. define_variable("Area", "Analysis");
    8. }
    9. }


    Depending on the value for the variable there are lines and columns visible. Unfortunately I have somewhere an error in there which I cannot find, since only the variable always holds the value DetailAnalysis