PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02/26/2016 9:09 AM by  Jackie H
Field Personalization on CB20
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Jackie H
ERP Admin Analyst
City of Boise
Basic Member
(22 points)
Basic Member
Posts:12


Send Message:

--
02/25/2016 12:41 PM
    We've been having issues with spaces being entered either at the beginning or the end of the CBT-TRANS-NBR when manually input.  The field size is up to 10 alpha characters. We've requested users enter 10 characters to eliminate this issue, but they get creative and the addition of spaces causes an issue with locating the transaction later.  Is there a way to personalize the field on the form to require exactly 10 characters be entered?
    Vince
    Senior Principal Software Engineer
    Infor
    Veteran Member
    (111 points)
    Veteran Member
    Posts:37


    Send Message:

    --
    02/25/2016 2:20 PM
    What you need to accomplish this is to attach some script to the form.
    Below is JScript for Smart Office. Portal/Design Studio would also support this, but with different script.
    
    	public function OnBeforeTransaction(sender: Object, e: CancelTransactionEventArgs)
    	{
    		if (e.FunctionCode != "A" && e.FunctionCode != "C")
    			return;
    		
    		var transFld = "CBT-TRANS-NBR"
    		var transNbr = form.GetElementValue(transFld);
    		if (String.IsNullOrEmpty(transNbr) || transNbr.Length < 10 || transNbr.Contains(" "))
    		{
    			ConfirmDialog.ShowAttentionDialog("Bank Transaction Entry",		// import Mango.UI
    				"Please enter 10 non-blank characters for Transaction Number", null)
    			var textBox: TextBox = form.GetElement(transFld);
    			textBox.Focus();
    			e.Cancel = true;
    		}
    	}
    
     
    Vince
    Senior Principal Software Engineer
    Infor
    Veteran Member
    (111 points)
    Veteran Member
    Posts:37


    Send Message:

    --
    02/25/2016 3:05 PM

    Jackie H
    ERP Admin Analyst
    City of Boise
    Basic Member
    (22 points)
    Basic Member
    Posts:12


    Send Message:

    --
    02/26/2016 9:09 AM
    Thanks - we will give that a try.
    You are not authorized to post a reply.