How to insert an item from Config file to Studio

Hi guys,

Can you help me insert an item from config file to my workflow? Say for example I created Fruits in config file with values of Apple, Orange, Banana. Should I put “” on them? And how will I insert it in my xaml. Thanks

You no need to insert double quotes around the values.

In the settings sheet of config file, just give the following values

Name - Fruits
value - Apple,Orange,Banana

When you read the Fruits in your xaml, the string contains Apple,Orange,Banana

If you want values in an array, split the string by Comma (,)

You can use excel file as your config file, then use data dictionary to store those data into your xaml.
These will be the flow to get your data.

  1. Save the data from excel to a Data table.
  2. For each row in data table, assign key/value pair in the dictionary.
  3. Use your dictionary by calling key. e.g Config(“Fruit1”).toString where Config is the name of your dictionary and Fruit1 is key from the dictionary.

I attached a simple example for this.
If this solved your query please mark this as the solution.
Config.xlsx (11.6 KB)
Main.xaml (5.8 KB)

Hi guys,

Thanks for the feedback. Here’s a sample screenshot of my config file for reference.

image

And then, I wanna check if the fruit in my TransactionItem can be found in in Fruits in my config file.

Something like this.

image

HI @caduque

Try this

  1. Read your CSV file
  2. Add For Each row activity
  3. Inside for each add two if(nested IF) conditions like
    3.a) if(row(0).tostring.trim.toupper=“FRUITS”
    if(row(1).tostring.trim.toupper.contains(YourTransactionItem)
    add Write line activity to print the result.

Is this something you looking for?

Thanks