I have a table - Collection Event and a table - Disposal Event. Each collection event is eventually assigned a Disposal Event.
Report is based on the Collection Event table.
I need an expression in the โIf This is Trueโ dialogue box of the Collection Event table that fires the report if Column [Timestamp] column type Date in the associated Disposal Event table is equal to today().
Iโve tried a range of expressions and no luck. Many thanks to anyone who can help. Stay safe.
Are these 2 tables connected to each other somehow? Is there a reference between them?
Yes. In the Collection Event able the user selects the appropriate disposal event. When viewing the Disposal Events the related collection events are listed. I hope that helps.
So you can easily create a LOOKUP() expression:
TODAY() = LOOKUP([_THISROW].[CollectionID],"Disposal Event","RefColumnName","Timestamp")
@LeventK Thank you. So the โRefColumnNameโ is [Disposal Event]. This is the column in the Collection Event table that is used to assign/ link it to the disposal event. When I use the expression TODAY() = LOOKUP([_THISROW].[CollectionID],โDisposal Eventโ,โDisposal Eventโ,โTimestampโ) I get the message that it cannot find column โDisposal Eventโ.
Whatโs your table name? LOOKUP() expression should take below parameters:
LOOKUP(Search string, TableName, LookupColumnName, ReturnColumnName)
@LeventK The table names are Collection Event and Disposal Event
Disposal Event has a related collection event.
@Scott_Hall
I have no any idea about your table schema and column names. I have given the LOOKUP structure above, so you can adjust the expression as per your table schema and column names I believe.
@LeventK Thank you. Iโve used this expression below. But am wondering if it will work since the [Timestamp] column in the Collection Event table is type DateTime. It does come up as a valid expression. This is for the โif this is trueโ dialogue box for table Disposal Event.
Today() = LOOKUP(Today(), โDisposal Eventโ, โTimestampโ, โTimestampโ)
(TODAY()) is equal to (One randomly chosen value from this list (
โฆThe list of values of column โTimestampโ
โฆfrom rows of table โDisposal Eventโ
โฆwhere this condition is true: ((The value of column โTimestampโ) is equal to (TODAY()))))
Have you tested it? Beyond the syntax check done by Expression Assistant? Testing is a good way to find out if it works or not.
@Steve Thanks Steve. Wasnโt very familiar with the testing feature but found it and will do.
User | Count |
---|---|
43 | |
30 | |
24 | |
23 | |
13 |