Guest Matt01SS Report post Posted July 15, 2009 I was curious if there was a way to insert variable values into a static text parameter. In our program we submit a parameter which contains xml data representing data nodes for records. (Ex. <record><guid>ABCDEF</guid></record>) In this example, the program will know that it is record ABCDEF that is being updated. For my WAPT profile, the page along with the parameter gets submitted, however the "<guid>" value changes everytime a new record is created. Basically, I need a way to do something like this: "<record><guid>$CurrentGUID</guid></record>". However, when I try something like that, the actual request keeps the variable name in there instead of switching it out for the variable's value. Is there a better way to do this?? Quote Share this post Link to post Share on other sites
Guest angela Report post Posted July 17, 2009 I was curious if there was a way to insert variable values into a static text parameter. In our program we submit a parameter which contains xml data representing data nodes for records. (Ex. <record><guid>ABCDEF</guid></record>) In this example, the program will know that it is record ABCDEF that is being updated. For my WAPT profile, the page along with the parameter gets submitted, however the "<guid>" value changes everytime a new record is created. Basically, I need a way to do something like this: "<record><guid>$CurrentGUID</guid></record>". However, when I try something like that, the actual request keeps the variable name in there instead of switching it out for the variable's value. Is there a better way to do this?? It seems, no. A value is extracted by function $Search and saved into the variable, then the value placed into the right place by function $Var. Quote Share this post Link to post Share on other sites
Guest Matt01SS Report post Posted July 17, 2009 It seems, no. A value is extracted by function $Search and saved into the variable, then the value placed into the right place by function $Var. So theres no workaround for inserting variable data into the static text? Quote Share this post Link to post Share on other sites
Guest angela Report post Posted July 20, 2009 So theres no workaround for inserting variable data into the static text? It seems that you misunderstood my answer to your question. I meant that for inserting variable data into the static text you should use the functions $Search and $Var: "A value is extracted by function $Search and saved into the variable, then the value placed into the right place by function $Var". Quote Share this post Link to post Share on other sites
Guest Matt01SS Report post Posted July 20, 2009 It seems that you misunderstood my answer to your question. I meant that for inserting variable data into the static text you should use the functions $Search and $Var: "A value is extracted by function $Search and saved into the variable, then the value placed into the right place by function $Var". I'm sorry I still can't quite follow what you are saying. How am I supposed to use the $Search or $Var functions when I'm already using the Static Text function. I don't see how you use the $Var function within the Static Text function. When I tried doing, <guid>$Var</guid>, the request did not replace $Var with a value, it actually used $Var as text. (ie. the program submitted <guid>$Var</guid> instead of <guid>123</guid>) Quote Share this post Link to post Share on other sites
Guest angela Report post Posted July 21, 2009 I'm sorry I still can't quite follow what you are saying. How am I supposed to use the $Search or $Var functions when I'm already using the Static Text function. I don't see how you use the $Var function within the Static Text function. When I tried doing, <guid>$Var</guid>, the request did not replace $Var with a value, it actually used $Var as text. (ie. the program submitted <guid>$Var</guid> instead of <guid>123</guid>) Now we understand. You need to create a parameter using 3 functions: Static text, $Var and Static text (as it is shown on the picture below). Quote Share this post Link to post Share on other sites
Guest angela Report post Posted July 21, 2009 Now we understand. You need to create a parameter using 3 functions: Static text, $Var and Static text (as it is shown on the picture below). In other words, you need to combine several functions in one parameter. I.e. the parameter will be defined not by one function, but by 3 functions: the 1st part of the text in the 1st Static text function, then $Var function, and then the 2nd part of the text in the 2nd Static text function. Quote Share this post Link to post Share on other sites
Guest Matt01SS Report post Posted July 21, 2009 That worked beautifully! Thank you for the "work-around", I didn't know that adding multiple functions would concatenate together to make one value. Just what I was looking to do. Thank You, Matt Quote Share this post Link to post Share on other sites