Parsing error : unexpected token

sarabjeet
Giga Expert

Hi,

i am not sure why this error in coming and how can we remove it. is there any other way to call if condition please let me what have i done wrong. PFB  screenshot for reference.

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

try adding logs

if (gr.next()) {

            var obj = {};
            obj["Number"] = gr.number + '';
            obj["State"] = gr.state.getDisplayValue();

gs.info('state'+gr.state.getDisplayValue());
            if (gr.state.getDisplayValue() == 'In progress') {
                obj["Sub state"] = gr.hold_reason.getDisplayValue();
            }
            inc.push(obj);
        }

Regards
Ankur

View solution in original post

9 REPLIES 9

Hi,

try adding logs

if (gr.next()) {

            var obj = {};
            obj["Number"] = gr.number + '';
            obj["State"] = gr.state.getDisplayValue();

gs.info('state'+gr.state.getDisplayValue());
            if (gr.state.getDisplayValue() == 'In progress') {
                obj["Sub state"] = gr.hold_reason.getDisplayValue();
            }
            inc.push(obj);
        }

Regards
Ankur

@sarabjeet 

Any update on this?

Regards
Ankur

Apologizes for the delay Ankur and thanks a lot for the help it worked.

You are welcome

Rachel Gomez
Giga Expert

Tips to Fix Formula Parse Errors
Check your formula inputs and make sure they're correct.
Use the IFERROR function and display a different result if an error occurs. 
Check your spelling and make sure all the parentheses are in the right places.
Make sure you're using the correct operators.

 

Regards,

Rachel Gomez