Forum Discussion
Thanks @Spiro_Taleski @jcampion
For now I have used mapper snap and it worked.
In the mapper I have created(tablename+year) - abc_Date.now().getFullYear() - $tablename
Instead, if I create only date part as variable Date.now().getFullYear() - $year How to pass this in table name filed in Select snap?
Table name = ‘abc_’+$year ?
Hi @Siva_Venna,
I think that would work. It seems like there’s a bug in the SQL snap’s expression evaluation where it’s choking on Date.now(), but if you already have the $year field I would think you can use ‘abc_’ + $year to get the tablename. Give it a try!
- Judy
- Siva_Venna6 years agoContributor
I gave a try it did not work. Hope the fix will resolve the issue.
- alchemiz6 years agoContributor III
instead of using the getFullYear which by the way the output in an integer type which I think causing the sql select snap to haywire 🙂 you can use concat
e.g.
‘abc_’.concat(Date.now().toLocaleDateString({‘format’:‘yyyy’}))or if you want to stick with the getFullYear() try to cast it as string
‘abc_’ + Date.now().getFullYear().toString()
- Siva_Venna6 years agoContributor
@alchemiz It didn’t work