- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 09:28 AM
I'm somewhat new to using scripting on SN. I was playing with workflow scripting and I just can't figure out what is the difference and the proper usage between current.variables.variablename or just using current.variablename? Within the same script, in some cases, both work, and in other cases, only current.variablename work ? search the internet and can't seem to find an answer. Thanks in advance for any clarifications.
Solved! Go to Solution.
- 35,159 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 09:43 AM
Your current is the table on which the workflow is currently running.
current.variables.variablename is the right way to fetch all the variables that were declared in the catalog item and now
a part of the requested item. So generally this gets picked up from the Variable ownership table in correlation to the requested item.
current.variablename would also sometimes work if you had the same variable or in this case column name defined in the current table.
So if were to take the flow of catalog item to requested item, anything in the catalog item that you would like to refer
you would use the current.variables.variablename and anything in requested item table by itself you would use current.variablename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 12:37 PM
sure, but where is this option to mark as correct? ideally both answers are good and fine with me which is why I checked liked...so I guess I have choose one? I think I have to email the admin to give me the option to mark as correct because I don't see the option available to me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 01:20 PM
dan.bruhn can help you with this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 02:30 PM
I've updated this discussion to a question.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 07:33 AM
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2023 11:24 PM
I faced the same and after some analysis i figured it out. will put in a simple way:-
current.variables.variable_name = use it when you want to fetch something from the form (catalog Item form which user will fill)
current.variable_name = use it to access something on the RITM
correct me if something is wrong! Thanks!
i am not adding the table names here because other folks have already added them you can refer to them i tried to put it in a rookie way!