Deref within a column formula

Hey Friends, I've got a parent table (Shoot List) containing a list of events, and a child table (Scorecard) as a form to capture results for each event in the Shoot List. 

On the 'Scorecard' I reference the 'Shoot List' for name, date, and a couple other pertinent details needed to fill out the 'Scorecard' form. All of the events on the 'Shoot List' have a specific date, except "Practice", which is all over the board and too numerous to list- still important to keep these results though.

In order to have each event date auto-populate I started with the deref [Event].[Date], which of course works fine except for practices which have no date. For practice the date field contains the word "Practice", so this was my solution:

if(
[Event].[Date]="Practice",
Today(),
[Event].[Date])

This also works fine, except for practices. It references the date from the parent table for events with a date, rather than the formula "Today()" when "Practice" is in the date field, it populates "mm/dd/yyyy" and sates it is an invalid date. If y'all can see something I missed there or a better way to run it I would be grateful. I imagine its something simple.

Thanks for time folks.

Side note- I would just use "Today()" for all events rather than the reference, but these are known to shift through the season. Due to reports and other references within the app the scheduled date must remain constant regardless of if the actual event date changes.

0 2 87
2 REPLIES 2

 

 

Hey. I don't know your data structure, but I assume that [Event].[Date] is not the field to check whether it's a Practice or NOT. Try changing it to

 

IF(
	[Event].[ColumnNameForEventType] = "Practice",
	TODAY(),
	[Event].[Date]
)

 

 

Each column has a specified Type and all values entered in this column should have a matching type. You have Date column but your expression would fill it with a Text value that is "Practice". This is not a good database practice 🙂

Why don't you just leave the field empty till it has a date?

Top Labels in this Space