Hello,
I have what I believe to be a simple coding question i was hoping someone could help answer. I know how to do a decent amount of things but am pretty new to Livecycle, and am trying to alter one of our PDF's so that if a certain field has a number beginning with the number 6 a certain button will become visible. I already have a set of code that is controlling the visibility of this button, but I wanted to add this clause to it. Can someone help me do this?
Here is the existing code:
if((QuestionsPage2.COIQuestions.COIYN.rawValue == "1" &&
QuestionsPage2.EmailButtons.NSFCheck.rawValue == "1") &&
(QuestionsPage2.ManagerSignature.ManagerDate.rawValue != null &&
QuestionsPage2.ManagerSignature.ManagerCheckBox.rawValue != null &&
QuestionsPage2.ManagerSignature.ManagerSignature.rawValue != null))
{
QuestionsPage2.PasswordSection.RiskPassword.presence = "visible";
QuestionsPage2.PasswordSection.PurchUseOnly.presence = "visible";
QuestionsPage2.PasswordSection.HRPassword.presence = "visible";
QuestionsPage2.EmailButtons.EmailContractsAndRisk.presence = "visible";
}
I want to add in the top section to look at the specific field at the first character to see if its a 6 or not. Here is what I have tried to do, but it hasnt worked.
if((QuestionsPage2.COIQuestions.COIYN.rawValue == "1" &&
QuestionsPage2.EmailButtons.NSFCheck.rawValue == "1"&&
ContractInfo.AgreementDetails.Org.substring(0,1) != "6" )
The field type I am looking at is a "Numeric Field" field with 4 characters.
Can someone help me fix my code so that this works?
Thanks!!