Skip to main content
Question

I have form and two input fields as Start date and End date.i select two dates(01/05/2018 to 06/30/2018) and submit then ...


I Am new to QuickBase, my requirement is , I have form and two input fileds as Start date and End date. When i select two dates(01/05/2018 to 06/30/2018) and submit form then create or insert records like 1)01-- 2018 -- 0.95(selected date not full month.if full month it treated as 1 see next record) 2) 02 -- 2018 -- 1 3) 03 --- 2018 -- 1 4) 04 --- 2018 ---1 5) 05 --- 2018 --- 1 6) 06 --- 2018 -1 insert records like these way, please explain as step by step because as i am new to Quick Base, Please response as soon as possible and Thanks Advance for solutions!
This topic has been closed for replies.

Hi Raghav,

Welcome to the Quick Base Community.

Can you please give me more details on the below part?

>>>then create or insert records like 1)01-- 2018 -- 0.95(selected date not full month.if full month it treated as 1 see next record) 2) 02 -- 2018 -- 1 3) 03 --- 2018 -- 1 4) 04 --- 2018 ---1 5) 05 --- 2018 --- 1 6) 06 --- 2018 -1 insert records like these way

Thanks,

Gaurav Sharma

I am explaing step by step
1) I Created Parent Tables as "Projects" And "ChildRep"
2) In Projects Table I have Created Two Fields as "Start Date" And "End Date"
3) In ChildRep Table I Have Created Three Fields As "Per_Count" And "Per_Month" And "Per_year"
3) In Projects When click On New Project Button As show Form As look like "Start Date" And "End Date"
4) When i Select Two dates (01/05/2018 to 06/30/2018)  and click save close 

Insert Records Like Below

Projects Table

 RecordId     Start Date        End Date
    1                  01/05/2018       06/30/2018


(Note: Established Relation from Projects to ChildRep As "one to many Relations")

(Note:  when selected date ranges  as 01/05/2018 and 06/30/2018 and listed like below
1 -> 01/05/2018 its not a full month it means (01/01/2018 to 01/31/2018 as a full month) but it selected from          01/05/2018 so we missed 5 days so we treated as full month so we putting 0.95 in  Per_Count  field in childrep table (full month treated as "1")

2 - >02/01/2018 as full month "1"

3 -> 03/01/2018  as full month "1"

4 - >04/01/2018 as full month "1"

5 - >05/01/2018 as full month "1"


6 - >06/01/2018 to 06/30/2018 (When i selected end date(06/30/2018) as satisfied  to month ) as full month "1"


)
I want to this Out Put 


ChildRep

RecordId     ProjectRecordId    Per_Count     Per_Month   Per_year

  1                            1                              0.95                     01                     2018
  2                             1                               1                         02                     2018
  3                             1                                1                         03                    2018
  4                             1                                1                         04                    2018
  5                             1                                1                          05                   2018
  6                             1                                1                           06                   2018    
  
    
Thanks

This can done with script. The one issue I have is that for the first partial month you use a [Per Count] value of 0.95 when I would calculate it as 27/31 = 0.87 since the start date if four days after the start of the month.

In any event, the following demo creates a set of child records equally spaced in time (days, weeks, months, quarters, years) based on a button click and user inputs. It can easily be modified to initialize the fields you describe.

The explanation in the forum might be a bit difficult to understand as it used some technical terms from functional programming but I was just trying to demonstrate how the task of creating and initializing child records can be automated and implemented in a very general fashion. You may have to study the example a little and create your own records but the example is general enough to give you the behavior you need.

Hylo[morphism] Technique
https://haversineconsulting.quickbase.com/db/bkw2ff3c8

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=511

This can done with script. The one issue I have is that for the first partial month you use a [Per Count] value of 0.95 when I would calculate it as 27/31 = 0.87 since the start date if four days after the start of the month.

In any event, the following demo creates a set of child records equally spaced in time (days, weeks, months, quarters, years) based on a button click and user inputs. It can easily be modified to initialize the fields you describe.

The explanation in the forum might be a bit difficult to understand as it used some technical terms from functional programming but I was just trying to demonstrate how the task of creating and initializing child records can be automated and implemented in a very general fashion. You may have to study the example a little and create your own records but the example is general enough to give you the behavior you need.

Hylo[morphism] Technique
https://haversineconsulting.quickbase.com/db/bkw2ff3c8

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=511

Thanks Mark
 
is it possible

Without using java script it means only using quick base native  

If it not possible can give logic of javascript code for above requirement . it may help us soo much.

Thanks for Advance who will provide logic