I have tried 10 times to update these values, copy/pasted, manually typed-in, cloned the module in another scenario, tried a few things, for some reason they revert back to some random numbers I’ve never inputed. I keep inputting this in the replace function, and the system reverts back to what you see in the screenshot. Weird!
Let’s see if we can break this down together, I understand how frustrating it can be sometimes
If I understand correctly, you want to set multiple variables, not just one, right?
Do all these people need to be in the same variable? If yes - ignore this question
If not - you should click for each variable on ‘Add item’.
Furthermore, it’s strange that your output is not doing what you want, but with this many replace functions nested into each other, a mistake is not far away (talking from experience here).
Can you by any chance, show a screenshot of your mapped variables (practitioner and starts_at) before they enter the scenario? I am curious what the type of the variables is, especially the practitioner one.
So I spoke to our Engineering team about this issue and they told me this:
When working with very large numbers (like IDs) inside functions, they might get rounded when you save a module. The root of this issue is that the number exceeds the MAX_SAFE_INTEGER value in JS.
Don’t worry, majority of these IDs can be handled as strings, and you can ensure this by adding a letter to the start or end. Then you can use replace to remove the letter:
This will ensure the ID is preserved correctly when you save the function, as it will be of String type instead of Number.