Calculation Between Three Date Field
Hi everyone I'm trying to do simple calculation between three Date Filed (Date1 Date2, Date3 (Start and End) 4th Field Name called "Period" where i want to Get number of Days, if Date 3 is Blank than count From Date1 & Date2 otherwise From Date1& Date3(Start). Please Suggest

  • Mr. Rainer; Sorry to bother you, but i could not fixed it what i looking for, If there is any way to shear my screen to you please please suggest. Thanks for the support.
  • This should work (T = Textfield of app#1-5): var app1 = All of T1.join(); var app2 = All of T2.join(); var app3 = All of T3.join(); var app4 = All of T4.join(); var app5 = All of T5.join(); app1 != "" ? app1 : app2 != "" ? app2 : app3 != "" ? app3 : app4 != "" ? app4 : app5 != "" ? app5 : "No app has a value"; If no app has a value in the text field = "No app has a value" (or whatever text you like). If "" doesn't work for a field (maybe date or category) you try null instead. If app3, app4 and app5 have values in their text fields it takes teh value from app 3. Rainer
  • Hi Rainer; Thanks for the support I think you did not get my problem properly, There are Various Apps-1 Apps-2 .......Apps-5 Based on relation with Apps-6 Create from (Apps-1 Apps-2 .......Apps-5) i want data in Apps-6 As below; If Data not Found in Apps-1 than looks for Apps-2 or 3 or 4 or 5 accordingly, and those data Field are not about Sum value its about date and Text field like "Date field " And "Reference-Text field" And "Remarks-Text Field" I used Vlookup & If Function in Excel i hope you understand. Note: For the Sum i am using Apps-1 Value + Apps-2 Value..+...+ Apps-5 Value and its working properly, but that script looks more better i will try it for sure.
  • Hello Dhakesh, I'm not sure if I understand you right what you want to do. Sure, you can get the data from as much related apps in one calculation field as you want. For example: In a calculation field in App 6 you want to show the sums of a specific number field (e.g. called "Revenue") from App 1, 2, 3, 4 and 5. "NameApp1: " + @sum of RevenueApp1 + "\\n" + "NameApp2: " + @sum of RevenueApp2 + "\\n" + "NameApp3: " + @sum of RevenueApp3 + "\\n" + "NameApp4: " + @sum of RevenueApp4 + "\\n" + "NameApp5: " + @sum of RevenueApp5 The result is a list. The @sum of-Fields you have to select via the incoming connection for every app 1-5; \\n = Line break. If you want the total of all revenues from all apps: @sum of RevenueApp1 + @sum of RevenueApp2 + @sum of RevenueApp3+ @sum of RevenueApp4 + @sum of RevenueApp5 Rainer
  • Thanks Mr. Rainer, It works Perfectly, Is it possible to gate Data from Multiple apps relation into one "Relation field" i.e. There are Apps-1, Apps-2, Apps-3, Apps-4 & Apps-5 all those Apps has one Field "Master" which Make relation with Apps-6 where i do "Create New Items" And it contain "Unique ID (Auto)" and user base, Date, Ref.(text) & Remarks "Text" those data are already there either Apps1,2,3,4, or 5 which i want to get by script based on the Filed "Master" on each apps. or any other best way. Note: Concept of the apps is to get summery for "Product transaction" i.e Input and output from Various area into single screen, there are other calculation field those i managed. Thanks!
  • Hi, if you have date1 = Feb 2nd, date2 = Feb 9th, date3 = Feb 19th and use in "Period" the calculation: var dateX = @date3 var d1 = moment(@date1); var d2 = moment(@date2); var d3 = moment(dateX); var unit = 'days' dateX != null ? d3.diff(d1, unit) : d2.diff(d1, unit) You'll get the result 17. If date3 is empty you'll get: 7 In var unit you can also unit "weeks", "months", "years" , "hours", "seconds", "minutes", Rainer
This question is closed.