[IIPT] Change cell's background color when the user fill a cell on the same line ?

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

  • [IIPT] Change cell's background color when the user fill a cell on the same line ?

    [IIPT] = [Is It Possible To]

    [Blocked Image: https://www.zupimages.net/up/21/10/4maq.png](img1, jedox view)

    [Blocked Image: https://www.zupimages.net/up/21/10/ejm5.png](img2, user view)


    Hello, i will first explain my goal: When I use jedox as user I want to change a cell's background color when I change the value of a cell in the same line. To indicate which line as changed.

    The img2 represent the view of a user and normally the line with the 0 is the line where I do all my test(none of them works :/). The line with the zero is fillable by the user because all the cell are unlocked. When I change for example the first cell: I put 7. I should change the background of the cell with the 0. That's how I see things.

    Now my question is: Is it possible or not ?

    I first try to make a macro, and put it on the cell with the 0. But at some point... the macro disobeys me ! I don't know why. For example, I try to change the background color when the value of the cell is ""(empty string), the programme go to the condition enter in the right entry and then doesn't execute the instruction to change the background color.
    here's my code:

    PHP Source Code

    1. function colorMacro()
    2. {
    3. if(activesheet() -> range('A1') -> value == 0){
    4. if(activesheet()->range('C4')->value == ""){
    5. activesheet()->range('C1')->value = 'test1';
    6. activesheet()->range('B4') -> style = 'background-color:#b4e1fa';
    7. activesheet() -> range('A1') -> value = 0;
    8. return 0;
    9. }else{
    10. activesheet() -> range('A2') -> value = activesheet()->range('C4')->value;
    11. if(activesheet() -> range('A2') -> value != activesheet() -> range('A3') -> value){
    12. activesheet()->range("B4") -> style = 'background-color:#00FF00';
    13. }else{
    14. activesheet()->range("B4") -> style = 'background-color:#b4e1fa';
    15. }
    16. }
    17. activesheet() -> range('A1') -> value = 1;
    18. return 0;
    19. }
    20. if(activesheet() -> range('A1') -> value == 1){
    21. if(activesheet()->range('C4')->value == ""){
    22. activesheet()->range('C1')->value = 'test2';
    23. activesheet()->range('B4') -> style = 'background-color:#b4e1fa';
    24. activesheet() -> range('A1') -> value = 0;
    25. return 0;
    26. }else{
    27. activesheet() -> range('A3') -> value = activesheet()->range('C4')->value;
    28. if(activesheet() -> range('A2') -> value != activesheet() -> range('A3') -> value){
    29. activesheet()->range("B4") -> style = 'background-color:#00FF00';
    30. }else{
    31. activesheet()->range("B4") -> style = 'background-color:#b4e1fa';
    32. }
    33. }
    34. activesheet() -> range('A1') -> value = 0;
    35. return 0;
    36. }
    37. }
    Display All
    The problem is about this instruction "activesheet()->range('B4') -> style = 'background-color:#b4e1fa';". The macro doesn't execute it I don't know why.

    Is there anyone that can help me on this ?

    Best regards
    Hello everyone if you are stuck and you can't post anything on this forum just contact info@jedox.com and request for account activation ! You're welcome !