Hello, could you help me with this problem please? I’m trying to place a variable into an attribute, but cannot find a proper syntaxe. The attibute is like this
ctrl name=‘Row 5’ role=‘row’
and I need to replace the number with variable.
So far I got to this expression
ctrl name=‘Row " + AttachCounter.ToString + "’ role=‘row’
but I’m getting error “String constant must end with a double quote”.
Thank you in advance. Martin
Edit: Sorry, I didn’t notice missing expressions.
rlgandu
(Rajyalakshmi Gandu)
January 19, 2024, 6:35am
2
@martin.vlcek
“webctrl aaname='Test” + YourVariable + “'”
mkankatala
(Mahesh Kankatala)
January 19, 2024, 6:41am
4
Hi @martin.vlcek
Try this:
"ctrl name='Row " + AttachCounter.ToString + "' role='row'"
Hope it helps!!
Regards
Unfortunately this doesn’t work.
Unfortunately this doesn’t work
mkankatala
(Mahesh Kankatala)
January 19, 2024, 6:46am
7
Hi @martin.vlcek
Try this:
"ctrl name=""Row " + AttachCounter.ToString + """ role=""row"""
Can you share the screenshot so that we can help you with that.
Hope it helps!!
Regards
rlgandu
(Rajyalakshmi Gandu)
January 19, 2024, 6:47am
8
@martin.vlcek
Please put the screenshot so it will be easy to give best advice
mkankatala
(Mahesh Kankatala)
January 19, 2024, 7:05am
11
Hi @martin.vlcek
Can you try the below syntax by replacing the last line:
<ctrl name='Row " & AttachCounter.ToString & "' row='row' />
Hope it helps!!
Anil_G
(Anil Gorthi)
January 19, 2024, 7:09am
12
@martin.vlcek
Just delete the newline in every line and the error should go off…
Eg: <webctrl …./><webctrl…/>
Instead of each in one line
Also normally if you opening in selector editor then you can right click in the area you want to insert and select the variable…that also would work
Cheers
1 Like
This works! Thank you @Anil_G very much.
1 Like
system
(system)
Closed
January 22, 2024, 7:18am
14
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.