Having a nightmare and its going to be so simple
How each row in a table already created
I have a dialog box open asking to enter a price with what ever is in the second column name
The entered price should then append to the correct row
When the dialog box comes up its asking me to enter the same price twice then appends the wrong row in the table
ravisangam
(ravisangam)
September 14, 2018, 11:08am
2
Row index is hard coded. So every time first row will be updated. Use a variable and increment it every time.
I think you need to update data table, to append means adding something at the end. See this
Is it possible to update a value from a database within a for each activity? What I’m trying to do is to set a flag in each row that it iterates. I’m doing this because it is a “for each within a for each”, so I need that when the main “for each” triggers the second, it skips the flagged rows.
If it’s possible please tell me how, I tried the next implementation:
Main For Each row in Datatable1
Get rows
Assign count = 0
Second For each row in Datatable2
- Get rows
- Assing count = coun…
I have two datatables in uipath, the table structure of them are same, but the rows are not. and I want to update the first one with another one, how can I do this in uipath ?
Any solutions for this ? thanks.
and to add a data row you can simply use Add Data Row
2 Likes
Mr_JDavey
(Joshua Davey)
September 14, 2018, 11:24am
4
Hi there @Jersey_Practical_Sho ,
I’m not sure I fully understand your request, but you may be able to resolve your problem by updating your Assign to be:
Assign - row.Item("Your Column To Have Data Written To") = Price
Thanks in advance,
Josh
1 Like
Cool that part works thank you.
The only other part is
When asking to input the prices it shows the same entered value for each row even though they are different
ravisangam
(ravisangam)
September 14, 2018, 11:49am
6
You are not updating DT_DATA_SName in the loop. How you are assigning value to that variable?
I’ve just figured that is the problem
So in another sequence
A datatable is created with 3 Columns Name SName and SPrice
Then 2 dialog boxes populate the first 2 columns
The part above I want it to for each row
show a dialog box with the SName and have the price entered and added to the table
its the showing of the SName im having trouble with
tried this but get the exclamation
ravisangam
(ravisangam)
September 14, 2018, 12:00pm
8
Then Instead of that variable, directly use datatable.row(“sname”)
ravisangam
(ravisangam)
September 14, 2018, 12:07pm
10
TableName.Rows[RowIndex][“ColumnName”].ToString()
Mr_JDavey
(Joshua Davey)
September 14, 2018, 12:15pm
11
Hi there @Jersey_Practical_Sho ,
Apologies, would you be able to provide a snippet of your XAML.
Thanks once again,
Josh
Mr_JDavey
(Joshua Davey)
September 14, 2018, 12:34pm
13
Hi there @Jersey_Practical_Sho ,
If I am understanding correctly, you simply need to add the following within the label:
row.Item("SName").ToString
Thanks once again,
Josh
1 Like