Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Replacement for SUBFORM_RECORD_ID

Questions related to using nuBuilder Forte.
Post Reply
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Replacement for SUBFORM_RECORD_ID

Unread post 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?
kev1n
nuBuilder Team
Posts: 4304
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Replacement for SUBFORM_RECORD_ID

Unread post by kev1n »

Hi,

Use #RECORD_ID# instead. This Hash Cookie will be replaced with the subform's record id.
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Replacement for SUBFORM_RECORD_ID

Unread post 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
kev1n
nuBuilder Team
Posts: 4304
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Replacement for SUBFORM_RECORD_ID

Unread post 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?
You do not have the required permissions to view the files attached to this post.
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Replacement for SUBFORM_RECORD_ID

Unread post 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!
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Replacement for SUBFORM_RECORD_ID

Unread post 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"?
vario
Posts: 153
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Replacement for SUBFORM_RECORD_ID

Unread post by vario »

I think the double quotes issue may have been browser caching or some such because now working with single quotes.
Post Reply