Saving Variable Strangeness

I’m having strange behavior with my variables. I run the following function when I open a form and click on a page (subform):

function SetSubformNameMembers(five, context, result)  {
    five.setVariable('SubformName', 'Members');
    five.log(`SetSubformNameMembers: SubformName=${five.getVariable('SubformName')}`);
    return five.success(result);
}

There is a separate function for each page that may be on a form.

When I open the form then click on the proper subform, I see this in the inspector under Logs as expected

Client

1/14/2026, 2:00:51 PM

"SetSubformNameNone"

Client

1/14/2026, 2:00:53 PM

"SetSubformNameMembers: SubformName=Members"


But when I look in the Variables tab and scroll down to Variables, I see this

"variable":{

16 items

"CurrentDate":

string"Wednesday, January 14, 2026"

"FyStartDate":

string""2025-07-01T00:00:00.000Z""

"AddMode":

string"false"

"SelectedTableFields":

string"{"SelectedGroups":{"KeyField":"StudyGroupKey","NameField":"StudyGroupName"},"SelectedPortfolios":{"KeyField":"PortfolioKey","NameField":"Portfolio"},"SelectedMembers":{"KeyField":"MemberKey","NameField":"SortName"},"SelectedReports":{"KeyField":"ReportKey","NameField":"ReportTitle"}}"

"LookupTableMap":

string"{"SelectedGroups":{"LookupTable":"StudyGroups","EntityKeyField":"StudyGroupsKey","EntityNameField":"GroupName"},"SelectedPortfolios":{"LookupTable":"Portfolios","EntityKeyField":"PortfoliosKey","EntityNameField":"Portfolio"},"SelectedMembers":{"LookupTable":"Members","EntityKeyField":"MembersKey","EntityNameField":"SortName"},"SelectedReports":{"LookupTable":"Reports","EntityKeyField":"ReportsKey","EntityNameField":"ReportTitle"}}"

"SetupForms":

string"["BoardPositions","SetupReports","StudyGroups"]"

"SelectAllSubRecordsForTheseForms":

string"["EmailReports"]"

"UserKey":

string"10000000-0000-0000-0000-000000000001"

"JoinTableMap":

string"{"BoardPositions":{"Members":"BoardMembers","Reports":"BoardReports"},"SetupReports":{"StudyGroups":"ReportGroups","Portfolios":"ReportPortfolios","Members":"ReportMembers"},"GenerateReports":{"StudyGroups":"ReportGroups","Portfolios":"ReportPortfolios","Members":"ReportMembers"},"StudyGroups":{"Members":"StudyGroupMembers"},"EmailReports":{"Reports":"","Portfolios":"","StudyGroups":""},"Members":{"StudyGroups":""}}"

"JoinTableFields":

string"{"BoardMembers":{"JoinLeftField":"BoardPositionKey","JoinRightField":"MemberKey"},"BoardReports":{"JoinLeftField":"BoardPositionKey","JoinRightField":"ReportKey"},"StudyGroupMembers":{"JoinLeftField":"StudyGroupKey","JoinRightField":"MemberKey"},"ReportGroups":{"JoinLeftField":"ReportKey","JoinRightField":"StudyGroupKey"},"ReportPortfolios":{"JoinLeftField":"ReportKey","JoinRightField":"PortfolioKey"},"ReportMembers":{"JoinLeftField":"ReportKey","JoinRightField":"MemberKey"}}"

"SelectedTableMap":

string"{"BoardPositions":{"Members":"SelectedMembers","Reports":"SelectedReports"},"SetupReports":{"StudyGroups":"SelectedGroups","Portfolios":"SelectedPortfolios","Members":"SelectedMembers"},"GenerateReports":{"StudyGroups":"SelectedGroups","Portfolios":"SelectedPortfolios","Members":"SelectedMembers"},"StudyGroups":{"Members":"SelectedMembers"},"EmailReports":{"Reports":"SelectedReports","Portfolios":"SelectedPortfolios","StudyGroups":"SelectedGroups"},"Members":{"StudyGroups":"SelectedGroups"}}"

"MyForm":

string"StudyGroups"

"MyTable":

string"StudyGroups"

"MyKey":

string"63955759-3104-4baa-8fc3-f7d792d52351"

"IsSetupForm":

booltrue

"SelectAllRecords":

boolfalse

}

I see all the expected variables that I’ve set, but don’t see one for SubformName. Have I hit a limit of some type?

The only reason I’m setting SubformName variable is because I believe Five does not keep track of the active subform. Is this still true? It would be so much easier if Five knew the active subform or page of the form was active.

Thanks…

Hi Ron,

Thank you for bringing this scenario to our attention.

I tested the same scenario by adding a function to the On Selecting event under Page Events (Forms → Pages → Events). As shown in the Logs tab, the function is executed successfully, and the variable is therefore available for use.

It appears that, in this scenario, the Variables tab in the inspector is not updated immediately. This seems to be a UI-related issue only and does not affect the actual availability of the variable.

I will share this with our team for further investigation.

In the meantime, if you would like to force the page to update, you can:

  • Click on the record in the subpage list, and then

  • Click the back button

This will refresh the page and update the Variables tab accordingly.

Please let me know if you have any questions or need further clarification.

Best regards,
Elton S