Nandeo Tifur
New Member
- Joined
- Aug 9, 2018
- Messages
- 2
I am having difficulty in figuring out what kind of data structure I need to utilize. I am wanting the user to type in the code to get the nested values to be passed as variables (Ex “Country1/Product2/Code1”).
I started creating a Dictionary and realized that one of the Codes is present in two different products. These codes represent specific items and changing its value would cause issues with the end user. I thought of using arrays, but don’t know how I would be able to functionally code over 36 different codes across 3 products. I initially thought that I could have a string in an array:
Prod = Array(“UK/Prod1/Code1”, “MX/Prod1/Code2”, “AG/Prod2/Code3”, …..)
The issue I had with that was trying to find the code within the array without specifying the whole string. Any ideas?
- Product 1
- Country1
- Code1
- Country2
- Code2
- Country3
- Code3
- Country1
- Product 2
- Country1
- Code1
- Country2
- Code2
- Country3
- Code3
- Country4
- Code4
- Country5
- Code5(duplicate code of product 3)
- Country6
- Code6
- Country1
- Product 3
- Country1
- Code1
- Country2
- Code2
- Country3
- Code3
- Country4
- Code4
- Country5
- Code5 (duplicate code of product 2)
- Country6
- Code6
- Country1
I started creating a Dictionary and realized that one of the Codes is present in two different products. These codes represent specific items and changing its value would cause issues with the end user. I thought of using arrays, but don’t know how I would be able to functionally code over 36 different codes across 3 products. I initially thought that I could have a string in an array:
Prod = Array(“UK/Prod1/Code1”, “MX/Prod1/Code2”, “AG/Prod2/Code3”, …..)
The issue I had with that was trying to find the code within the array without specifying the whole string. Any ideas?