I have the if statement below that will works just with way I want it to, if the button is click and the Portfoliocode is null the border and fill color turns red and the "Please complete all required fields to print." message appears the once the PortoflioCode has something in it the border and fill colors turn back white and document prints.
This assistance I need is, there are 4 more fields that need to operate the same way under the same button when clicked. So if either one of these are left blank the blank one would turn red and once the blank ones are filled they will turn back white and the document will print.
if ((form1.FundRequest.PcCn.PortfolioCode.rawValue == null)) then
FundRequest.PcCn.PortfolioCode.border.fill.color.value = "255,0,0"
xfa.host.messageBox("Please complete all required fields to print.")
else
FundRequest.PcCn.PortfolioCode.border.fill.color.value = "255,255,255"
form1.#pageSet[0].Page1.PrintButton1.execEvent("click")
endif
Thank you for any assistance
Parre
Solved! Go to Solution.
Views
Replies
Total Likes
HI Parre,
If I understand correctly this should do what you want;
var valid = 1;
if ((form1.FundRequest.PcCn.PortfolioCode.rawValue == null)) then
FundRequest.PcCn.PortfolioCode.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode1.rawValue == null)) then
FundRequest.PcCn.PortfolioCode1.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode2.rawValue == null)) then
FundRequest.PcCn.PortfolioCode2.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode3.rawValue == null)) then
FundRequest.PcCn.PortfolioCode3.border.fill.color.value = "255,0,0"
valid = 0;
endif
if (valid) then
form1.#pageSet[0].Page1.PrintButton1.execEvent("click")
else
xfa.host.messageBox("Please complete all required fields to print.")
endif
This assumes your other three fields are called PortfolioCode1, PortfolioCode2, and PortfolioCode3
Hope this helps
Bruce
Views
Replies
Total Likes
HI Parre,
If I understand correctly this should do what you want;
var valid = 1;
if ((form1.FundRequest.PcCn.PortfolioCode.rawValue == null)) then
FundRequest.PcCn.PortfolioCode.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode1.rawValue == null)) then
FundRequest.PcCn.PortfolioCode1.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode2.rawValue == null)) then
FundRequest.PcCn.PortfolioCode2.border.fill.color.value = "255,0,0"
valid = 0;
endif
if ((form1.FundRequest.PcCn.PortfolioCode3.rawValue == null)) then
FundRequest.PcCn.PortfolioCode3.border.fill.color.value = "255,0,0"
valid = 0;
endif
if (valid) then
form1.#pageSet[0].Page1.PrintButton1.execEvent("click")
else
xfa.host.messageBox("Please complete all required fields to print.")
endif
This assumes your other three fields are called PortfolioCode1, PortfolioCode2, and PortfolioCode3
Hope this helps
Bruce
Views
Replies
Total Likes
Thanks Bruce,
This is just what I wanted. Thank you so much for your help!!!
Parre
Views
Replies
Total Likes