Added
A procurement team is building a SAP Build Apps application for employees to review purchase requests. The request list and request details must be available on several pages, while a temporary search term should be cleared whenever the user leaves the search page. The application must also retain a selected request when navigating between pages. The team wants to avoid duplicating values in multiple variables, and it is not using a backend for these UI state values. Which variable design best meets these requirements?
App variables are available across the application's pages, so they suit the shared request list and the selected request that must survive navigation. A page variable is scoped to its page, which makes it appropriate for the temporary search term. Keeping all values as page variables would not meet the cross-page requirement. Keeping the search term as an app variable would require extra clearing logic and would not give it the requested page scope. A data variable is intended for data sources, not simply for UI state.