Calculate related record

Calculate related record

Hi, 

I am trying to look for a way to solve this problem… 

I do have two custom modules "Subscriptions" and "Subscription_Issues" that are linked to the regular Invoices module in Zoho CRM. 

When I add a new invoice I can choose: 
  1. A value in the field "Subscription_Length" (which is a picklist where I can select a number). The value can be: 6 or 12 (which means: 6 or 12 issues per year). 
  2. A value in the field "Subscription_Start_Issue_Number" (this is a lookup field). The value can be i.e. 80.

So when I choose the value "6" in the picklist "Subscription_Length" and if the "Subscription_Start_Issue" is 80 there should be a "Last_Subscription_Issue" calculated (the result should be in this example: 85): 
  1. 80
  2. 81
  3. 82
  4. 83
  5. 84
  6. 85

And I need this last issue (in this example = 85) as a value in the lookup field "Last_Subscription_Issue". 

How can I do this? 

Thanks a lot for your help, 
M.