The best method to make a local variable without an indicator is to use shift registers in your while loop. You can initialize the shift register to 0 at the start of your program and modify it as you need within the program.
To learn more about how to use shift registers, refer to Shift Registers: Passing Values between Loop Iterations
Another option would be to make an indicator that you would like to use as a variable. Using the "Visible" property node, you can make this indicator invisible in the front panel but still use it in the block diagram. To make an indicator invisible:
- Create a Visible property node by right-clicking the indicator and navigating to Create » Property Node » Visible.
- Place this node in your block diagram. Wire a False constant to make the indicator invisible.