Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

'Submit To' Based on Number in Table Cell

Avatar

Level 3

Hi,

Upon clicking a Submit button, I'm trying to have my form go to certain people based on a number in a table cell.

For example, if the dollar amount in the table cell I named "TotalPrice" is $1,000 or greater, it goes to one group, and if it is less than $1,000, it goes to another group.

Here is the script I was trying, but not having any success...

var vEmail;

var vCC;

if (Page1.Table1.Row[11].TotalPrice.rawValue >= 1000)

{

    vEmail = Page1.Buyer.rawValue;

    vCC = Page1.RequestorEmail.rawValue + "person@company.com";

}

else

{

    vEmail = Page1.Buyer.rawValue;
    vCC = Page1.RequestorEmail.rawValue;
}

Any advice would be appreciated.

Regards,

ZeroZone

1 Accepted Solution

Avatar

Correct answer by
Level 8

var vEmail;

var vCC;

if (Page1.Table1.Row.all.item(11).TotalPrice.rawValue >= 1000)

{

    vEmail = Page1.Buyer.rawValue;

    vCC = Page1.RequestorEmail.rawValue + ";anotherperson@company.com";//make sure to separate emails with semicolons(;)

}

else

{

    vEmail = Page1.Buyer.rawValue+";whoeverelse@company.com";

    vCC = Page1.RequestorEmail.rawValue;

}

app.mailMsg({bUI:true,cTo:vEmail,cSubject:"My Subject",cCC:vCC})

Kyle

View solution in original post

0 Replies

Avatar

Correct answer by
Level 8

var vEmail;

var vCC;

if (Page1.Table1.Row.all.item(11).TotalPrice.rawValue >= 1000)

{

    vEmail = Page1.Buyer.rawValue;

    vCC = Page1.RequestorEmail.rawValue + ";anotherperson@company.com";//make sure to separate emails with semicolons(;)

}

else

{

    vEmail = Page1.Buyer.rawValue+";whoeverelse@company.com";

    vCC = Page1.RequestorEmail.rawValue;

}

app.mailMsg({bUI:true,cTo:vEmail,cSubject:"My Subject",cCC:vCC})

Kyle