Crow Canyon Software Forum
Workflow - Build string action
Quote from mkirby on August 17, 2021, 12:34 pmI would like to see an action that allows you to build a string using placeholders and then assign that to a variable. For example:
{WebUrl}/_api/someMethod("[ColumnName|InternalName]")
I would like to see an action that allows you to build a string using placeholders and then assign that to a variable. For example:
{WebUrl}/_api/someMethod("[ColumnName|InternalName]")
Quote from supportTeam on August 18, 2021, 9:15 amHi Michael,
Please define a variable in NITRO Workflow and then use strcat function to concate the string.
Ex: $strcat({WebUrl},/_api/someMethod,(",[ColumnName|InternalName],"),)
Hi Michael,
Please define a variable in NITRO Workflow and then use strcat function to concate the string.
Ex: $strcat({WebUrl},/_api/someMethod,(",[ColumnName|InternalName],"),)
Quote from mkirby on August 18, 2021, 10:15 amQuote from supportTeam on August 18, 2021, 9:15 amHi Michael,
Please define a variable in NITRO Workflow and then use strcat function to concate the string.
Ex: $strcat({WebUrl},/_api/someMethod,(",[ColumnName|InternalName],"),)
"Close but nocigar"
First, the {WebUrl} function isn't giving me anything. So I hard coded the web URL into the string along with several column references. here's what the debugging shows:
Function Name: strcat
Function Parameters: http://webserver/NITRO/_api/web/getfilebyserverrelativeurl("/NITRO/ApprovedInvoices/,[Name|FileLeafRef],")/moveto(newurl="/NITRO/Invoices/,[FolderName|FolderName],/,[Name|FileLeafRef]," ,flags=1)
Expression value type: Invalid
Expression value type: Invalid Field Value Type: Invalid
varURI - Exception in ProcessVariable for variable with Id: 3 , Error: GetExpressionComputedValue: Invalid argument for computed condition value: http://webserver/NITRO/_api/web/getfilebyserverrelativeurl("/NITRO/ApprovedInvoices/
Quote from supportTeam on August 18, 2021, 9:15 amHi Michael,
Please define a variable in NITRO Workflow and then use strcat function to concate the string.
Ex: $strcat({WebUrl},/_api/someMethod,(",[ColumnName|InternalName],"),)
"Close but nocigar"
First, the {WebUrl} function isn't giving me anything. So I hard coded the web URL into the string along with several column references. here's what the debugging shows:
Function Name: strcat
Function Parameters: http://webserver/NITRO/_api/web/getfilebyserverrelativeurl("/NITRO/ApprovedInvoices/,[Name|FileLeafRef],")/moveto(newurl="/NITRO/Invoices/,[FolderName|FolderName],/,[Name|FileLeafRef]," ,flags=1)
Expression value type: Invalid
Expression value type: Invalid Field Value Type: Invalid
varURI - Exception in ProcessVariable for variable with Id: 3 , Error: GetExpressionComputedValue: Invalid argument for computed condition value: http://webserver/NITRO/_api/web/getfilebyserverrelativeurl("/NITRO/ApprovedInvoices/
Quote from mkirby on August 18, 2021, 1:32 pmOk, I have this working on everything EXCEPT parenthesis (). I can put in the HTML code for left and right parenthesis in the variable and when I email myself the resulting string, it's translated properly. However, when I try to use it in the Call Web Service action, it still sees the HTML code (( and )) instead of ( and ). Is there any kind of escape character we can use to let Nitro know to use the actual character and not think it's part of a function? How about something like **( to tell it to use that character?
Ok, I have this working on everything EXCEPT parenthesis (). I can put in the HTML code for left and right parenthesis in the variable and when I email myself the resulting string, it's translated properly. However, when I try to use it in the Call Web Service action, it still sees the HTML code (( and )) instead of ( and ). Is there any kind of escape character we can use to let Nitro know to use the actual character and not think it's part of a function? How about something like **( to tell it to use that character?
Quote from mkirby on August 18, 2021, 2:22 pm"Programming is nothing but smoke and mirrors..."
I was able to get this working with a bit of trickery. On the library I created two new columns, left and right. Both are setup as single line text fields with a text limit of 1 and a default value of either ( or ) depending on the column. Both columns are also required. Then I referenced those columns in my $strcat() function and used that as the URI in a Call Web Service action. Much to my surprise, IT WORKED!
"Programming is nothing but smoke and mirrors..."
I was able to get this working with a bit of trickery. On the library I created two new columns, left and right. Both are setup as single line text fields with a text limit of 1 and a default value of either ( or ) depending on the column. Both columns are also required. Then I referenced those columns in my $strcat() function and used that as the URI in a Call Web Service action. Much to my surprise, IT WORKED!
Quote from Scott Restivo on August 20, 2021, 8:07 pmThat is good to hear. Shows that with the right effort, just about anything can be accomplished. Your solution is a trick worth remembering!
That is good to hear. Shows that with the right effort, just about anything can be accomplished. Your solution is a trick worth remembering!