Forum Discussion

CarolMcconnell's avatar
CarolMcconnell
Qrew Captain
8 years ago

How to make a custom column in a report

I have a two fields both date fields.  I want the user to enter a date frame, so I use the on or after and on or before for that field.  My issue, is that I need the date range to be from two fields.  So the date range they enter should be either Date Closed or Date Completed.  How can I build that formula?
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Just asking for clarity....

    Are you looking to make some filters in the report that use the function "Ask The User" to find a date range?
    Or
    Are you trying to make a formula that evaluates both dates to determine if something is upcoming, ongoing or finished?
  • Kind of both.  If possible I was wanting to make a custom column that would look at both the date fields and then add that column as an ask the user field  I have no problem with the adding as ask the user.  I just wanted to see a formula would look at both fields based on what the user inputs?
  • My suggestion for these type of situations is that you create a single record in a table just designed to have one record. That record will hold your query parameters, Those being the dates. That single record will have a record ID of one.
    Then on your details table you create a formula field with the formula of 1 and make a relationship back to that parameters table. Now each one of your child's detailed records can have the opportunity to know what your query date parameters are.
    Then you can create any kind of complicated formula you want to decide if the records in your detail table qualify for the query filters that you have put in.   You can also embed a report right on that query records so that as soon as you save your data parameters the results will show right on that record. 
    There's also a way to make this more flexible in a multi concurrent user situation and to do that you would designing slightly differently, but  the same idea..
  • Actually I figured it out.  I created a new field  then I query off of this new field.  Here is the new field.  If(IsNull([Linked]),[File Closed/Sent to Region],[Linked]). I realized I only need to look at one or the other.