Sabir Mustafa
Sabir Mustafa

Reputation: 188

Onchange not working when data is inserted through python

I have 8 different forms which are actually 8 different stages of some development process. Plus I have created one more form (Main Form) where I keep record of the progress on all the eight stages of each case.

Main Form:

It has 8 Headings and saves the link of the record created against each stage. Save the starting date and ending date of the stage. Plus saves the current stage of the document.

For example if Feasibility Report is in "In Progress" stage it will show in progress in the main form below the heading of Feasibility Report. Please see the attachment.

enter image description here

If the user press "Send for Approval" button on Feasibility Report form, the python function against this button will change the stage to "Send for Approval" on Feasibility Report form plus Main form. Now I want to send an email to concern users on every stage change of every Development stage.

There are 8 Development stages & each developing stage contains 4 stages. So I have created one function which will send email to all the required users on stage change of their concerning document.

I want to call this email sending function on "OnChange" of "At Stage" field of each Stage. You can see the "At stage" field in the above attached Image. But the issue is that I am updating this "At Stage" field with python code not change its value manually that why my onchange function is triggering.

Is there any option to make this work or any other alternate which will help me trigger the email function on change of any "At Stage" field.

Thanks

Upvotes: 1

Views: 264

Answers (1)

Muhammad Kamran
Muhammad Kamran

Reputation: 561

Well On-change is not possible when you are entering data through python. My suggestion is that you should create the email sending functions in your MAIN FORM Model and then call them on every stage through python. I mean when you change the AT STAGE Field in main form, from the same function call the email function.

Hope it is the answer to your question.

Cheers!

Upvotes: 1

Related Questions