Raja.G
(Mr.RPABot)
July 28, 2020, 1:23pm
1
Hi Guys,
I have existing array , i need to add new string into the existing array.
for example,
Arrlist={“abc”,“gdf”, “jjj”}
Arrlist is array
i have add to one IF condition once condition true automatically add the new string “fff” to Arrlist
like
Arrlist={“abc”,“gdf”, “jjj”,“fff”}
Please anyone help.
Regards,
Raja G
@Raja.G You can use Arrlist.Append(“fff”)
You would have to use it in an Assign Activity in this way :
Arrlist = Arrlist.Append(“fff”).ToArray
3 Likes
Raja.G
(Mr.RPABot)
July 28, 2020, 4:26pm
3
@supermanPunch ,
I have used your logic ,but its not working , never going to append
Hi @Raja.G
As per i know Array is of static length.
So how can new variable be added to that array ?
I will suggest that make it as list and then add the string to the same list and then convert that list to array.
Happy Automation
Best Regards
Er Pratik Wavhal
Raja.G
(Mr.RPABot)
July 28, 2020, 4:35pm
5
Hi Pratik,
I have spend more time ,can u tell its possible??, how to make dynamic array its possible??
ppr
(Peter Preuss)
July 28, 2020, 4:36pm
6
but its better to work on lists for such tasks
3 Likes
@Raja.G What was the error you got ? You might consider using list instead of Array though
Raja.G
(Mr.RPABot)
July 28, 2020, 4:59pm
8
@supermanPunch ,
I am not using list, i have using array only,
shall i add list in this code,any suggestion please,
my code like below,
Input dialog option array {Existing Array} like {“aa”,“bb”,“cc”}
If condition once true
Arrlist.append(stringveriable).ToArray
I couldn’t able to add new string veriable in Array
@Raja.G What was the Error Can you show a Screenshot of how you have used it in the workflow?
Raja.G
(Mr.RPABot)
July 28, 2020, 5:36pm
10
@supermanPunch Error not shown , once IF condition true working fine but string not to be add in Array
Raja.G
(Mr.RPABot)
July 28, 2020, 5:47pm
11
@supermanPunch ,
This is sample code below,
My expectation add string to array in dropdown list input dialog box once condition true
Please help anyone to resolve.
Main.xaml (7.5 KB)
ppr
(Peter Preuss)
July 28, 2020, 6:19pm
12
@Raja.G
Main.xaml (7.5 KB)
Arr.Concat({Hello}).ToArray did as mentioned above the concatenation
displaying the Array content was done with help oj String.Join(“,”, Arr)
1 Like
Raja.G
(Mr.RPABot)
July 28, 2020, 7:04pm
13
@ppr ,
Thanks its working fine , message box showed correct output ,i have another doubt,once done execution,
Again i am going run then automatically add in new string “Update” in Arr “Input dialog box” dropdown, if its possible??
Please help this
Regards,
Raja G
ppr
(Peter Preuss)
July 28, 2020, 7:05pm
14
didd’t get you. Can you describe more on detail?
Raja.G
(Mr.RPABot)
July 29, 2020, 1:58am
15
@ppr ,
Once string(“update”) add to the Array , After that string(“update”) automatically come to dropdown of input dialog box array
1 Like
@Raja.G Are you using an RE Framework ?
Raja.G
(Mr.RPABot)
July 29, 2020, 4:41am
17
@supermanPunch ,
no i am not using reframework, i am using studio
@Raja.G Can you use that Input Dialog Activity After If Condition Activity and Check? If you want to Save the Updated Array each time you run the workflow then you would need it to be updated in a text file or Excel file. Then we can retrieve each time the contents from Excel and pass it as Array to the Input Dialog. In that way you can be able to See the Updated Input Dialog everytime you’ll be able or it is not possible to do so
1 Like
@Raja.G Check this Workflow :
UpdateArray.zip (1.8 KB)
1 Like
Raja.G
(Mr.RPABot)
July 29, 2020, 7:55am
20
@supermanPunch ,
Thanks man, i have another doubt, how to pass excel array to input dialog box array dropdown,
Please help this