How to add variable to your declared variable in robot framework?
I have a lot of table variables in my script. Below is a sample
*** Variable ***
${Amount1_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[4]/div/table/tbody/tr[3]/td
${Amount2_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[6]/div/table/tbody/tr[3]/td
${CounterParty_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[90]/div/table/tbody/tr[3}]/td
${CurrencyPair_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[76]/div/table/tbody/tr[3}]/td
${SpotRate_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[13]/div/table/tbody/tr[3]/td
Then in my test cases I use get element count to count my table row and use that to my variables like the sample below
${Count} get element count xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table
set suite variable ${New_Count} ${Count}
Now I use the ${New_Count} variable to my declared variable like the sample below
*** Variable ***
${Amount1_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[4]/div/table/tbody/tr[${New_Count}]/td
${Amount2_Column} xpath=//div[@id='*GFtable***0***EventDealDataValidationMask***report***unfixedData']/table/tbody/tr[1]/td[6]/div/table/tbody/tr[${New_Count}]/td
Upon running the script, my variable isn't recognized.