AnsweredAssumed Answered

Get date to new layout

Question asked by heidisagat on Oct 30, 2012
Latest reply on Nov 5, 2012 by philmodjunk

Title

Get date to new layout

Post

     I have a table with two datefield, date1 and date2.

     I can search for records "from date" to "to date".

     I have used this script

     If [IsEmpty (ExampleTable::GlobalStartDate)]
           Show Custom Dialog ["("Start Date";"Start Date must have a value. Please reenter"]
           Exit Script []
     End If
     If [IsEmpty (ExampleTable::GlobalEndDate)]
           Show Custom Dialog ["End Date";"End Date must have a value. Please reenter"]
           Exit Script []
     End If
     If [ExampleTable::GlobalEndDate < ExampleTable::GlobalStartDate]
           Show Custom Dialog ["Invalid Date Range";"End Date cannot occur before Start Date. Please reenter"]
           Exit Script []
     End If
     Go to Layout ["Layout #1"]
     Enter Find Mode []
     Set Field [ExampleTable::Date1 ; ExampleTable::GlobalStartDate & "..." & ExampleTable::GlobalEndDate]

     New Record/Request

     Set Field [ExampleTable::Date2 ; ExampleTable::GlobalStartDate & "..." & ExampleTable::GlobalEndDate]
     Perform Find []

     I want this records shown in another layout and get the date found either in date1 or date2. 

     Can somebody help me?

Outcomes