Page 1 of 1
Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 8:55 am
by vario
I've looked around and can't find the answer!
In v3 I had a Display column on a subform which selected a sum() using '#SUBFORM_RECORD_ID#' to join to a table. How can I do this in Forte?
Re: Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 9:53 am
by kev1n
Hi,
Use #RECORD_ID# instead. This Hash Cookie will be replaced with the subform's record id.
Re: Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 10:23 am
by vario
Initially it didn't work - but in a desperate attempt to eliminate all issues I used double quotes around the hash cookie and success!
I was using single quotes...
'#RECORD_ID#' - fail
"#RECORD_ID#" - success
Re: Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 10:29 am
by kev1n
I tested it by adding a display field to a subform using the SQL as shown in the screenshot. As you see, all subform records are displayed.
Can you post your SQL?
Re: Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 10:44 am
by vario
Kev1n, I thought to try double quotes just after posting my reply so I edited it with successful outcome - your reply is obviously to my unedited reply. Sorry!
Re: Replacement for SUBFORM_RECORD_ID
Posted: Sun May 02, 2021 11:05 am
by vario
The strange thing is, only #RECORD_ID# needs to be in double quotes. I can use hash cookies from the main form in single quotes with no problem.
Does anyone else have this issue? Is it a configuration thing, or a "bug"?
Re: Replacement for SUBFORM_RECORD_ID
Posted: Wed May 05, 2021 9:08 am
by vario
I think the double quotes issue may have been browser caching or some such because now working with single quotes.