External files for variables

Do the variables have any external file to save/ view? Or we can add the variables from local into FinalBuilder instead of inserting 1 by 1?

There’s no external load/save of variable definitions if that is what you are asking? You can load variable values from a file, see the Save/Load variables to/from ini file actions.

Thanks, I have another question about variables…
Can I set the “Prompt for Variables/ Enhanced Prompt for Variables” actions automatically change all the variable i need after i selecting the group of variables I need?

You can use multiple prompt actions, the first one selecting the group and then use if else or switch case actions to show another prompt actions with the variables based on the selected value of the first one.

There’s no automatic/magic way of achieving this, there are just too many variations to make this usable.

If there’s more than hundred variables in the project with different markets. So, it means that every time I build, It will show hundreds of prompt action to archieve the build?
Do you have any other suggestion to solve this problem?

No one is suggesting that you show hundreds of prompts. One prompt to select from a list of markets, then using Switch and Case action, choose a second prompt to display based on the value selected in the first prompt. The second prompt will include all the variables required for a single market.

It’s difficult for us to make any further suggestions without some details or examples of the types of variables you are working with and what you are trying to achieve.

Hi, Sparky
Sorry for my bad explanation. I would like to ask about the Variables contained in the group (Image below).
I want to build the project by differentiating from these groups of the variables. Because the system does not allow the variable in the same name so I planned to let all the variable send to the variable in “Main” to build the project.
Therefore, I will only have a single target but can work with multiple markets.

Sorry, but we’re still quite confused what you’re trying to do? What are the markets and what do you what to do different for each of the markets?

This is a market I want to do like (not yet finish), each action has its own variable need to define. Then, when I want to use the same target to deploy another market, I will need to use another set of variable group to build for another market.
So, I planned to use the “Main” group to work with the target(Branch_1). To let the other group of the variable can pass the value to the “Main”. Therefore, I found that the “Prompt for Variables/ Enhanced Prompt for Variables” actions can help me replace the value before running the target. image
But in this case, it is a manual process, I want to build with automatically such as after select the market I need, then it will help me replace all the variable and run the target.

Still, not sure what you mean by ‘market’ here - maybe your application is customised differently for different groups of customers and these groups of customers are the markets? I’m also assuming that the group names correspond to the markets?

I have attached a project which attempts to do what I think you may be looking for.

MarketSelection.fbp8 (4.7 KB)

This starts with an action to select a Market (either SG or MY). It then uses Switch and Case actions to choose a dialog to show depending on the selected market. Each dialog has the same variables but different default values.

Let us know whether this helps with your scenario, or if you want to do something different? Maybe you want to have different variables on the prompt dialog for each market? Or maybe you don’t need the second dialog at all and the variables can be set automatically using Set Variable actions. Or maybe we’ve completely missed the mark?

Thank you and yes I dont need the second dialog at all. So, I only need to add on the Set Variable actions?

Yes, you can add Set Variable actions instead of showing the dialogs. See the updated example: MarketSelection.fbp8 (4.0 KB)

Alternatively you can load the variables from sections in an INI file MarketVariables.ini (122 Bytes) . See this example project: MarketSelectionFromIniFile.fbp8 (2.7 KB)

Thank you very much!
If I want to create new Variable with new Grouping, how to run from ini file?

Just add a new section to the ini file. e.g.

New_Variable = variable_value

Thank you very much!

Hi, sorry for asking again on this post after several days…
For the INI file can it add to the Tab instead of calling from the file every time?

Do mean to actually define the variables when loading from the ini file? If that’s what you are asking then the answer is no. FinalBuilder is really like a statically typed langage, variables need to be declared before they can be used.

Okay, Thank you very much!