• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Execute Form Control Event using Event Rules

Rauf

VIP Member
Is there any way to execute "Control Exited/Changed-Inline" of a text field when a user press a button.
For example, I'm helping users to auto populate some fields based on a request number. So if the user click "Populate" button, it will assign values to Company, Supplier, Business Unit fields etc.
Now, there are some code in the events of Suppliers. When populating the supplier field, these events are not executed.
One way is to copy the code from the event of the Supplier field and paste in the "Post Button Clicked" event.

Is there any easy way to do this ?
 

Rauf

VIP Member
Found a way using a combination of Set Control Focus and Assignment !
The below code works fine.

Get Details for Supplier Advance
. FC PR - Pay. Req. No -> BF mnPaymentRequestID
. VA evt_PR_Company_CO <- BF szCompany
. VA evt_PR_CostCenter_MCU <- BF szCostCenter
. VA evt_PR_Supplier_ALKY <- BF szAlternateAddressKey
. VA evt_PR_InvoiceNumber_VINV <- BF szVendorInvoiceNumber
//
Set Control Focus(FC Company)
FC Company = VA evt_PR_Company_CO
//
//
Set Control Focus(FC Long Address Number)
FC Long Address Number = VA evt_PR_Supplier_ALKY
 

Larry_Jones

Legendary Poster
-OR-
just move the code into a button. Have the Control Exited/Changed-Inline" event call the button. Anywhere else you need it do the same.
 

Rauf

VIP Member
Larry,

That's also a good idea.
But I had few number of controls, so I was feeling lazy to replicate all those control's code to corresponding buttons.
 
Top