Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 04:37:09 +0000



Post From: C++ advice needed: how to update 2 studies via 1 user input

[2020-06-15 12:02:06]
ochocinco - Posts: 29
Hi, looking for C++ advice on the approach to have 1 user input change apply to multiple studies.

Study A has an integer SCInputRef initially set = 5.
Study B has an integer SCInputRef initially set = 5.
If 6 is the new desired input value, (as the studies are built today) i would open the study settings for each and change the input value.
How would you approach one action which then updates the value 5->6 for both studies?

My possible ideas so far:
a) Is this a scenario to leverage a global variable? If both studies are in the same dll, could the SCInputRef be a global global variable and would updating either study input propagate?
b) Should I build a (new) separate study specifically for the the integer SCInputRef input and design Study A and Study B to reference the value of the new study?
c) Maybe I'm over complicating this and there is some built in sc function I havent found?

thanks in advance for your suggestions.