\Expression\" option is missing in Default Value Source?Binding the value of Query String to control"


Badge +9

I am just able to see "Use Connected source default value" and "Set Default value" but not able to see Expression. I want to bind the value from query string to a value but its not coming


9 replies

Badge +16

that option isn't available in a single line of text field - you have to use calculated value

Badge +9

I am not able to find the function to bind query string value for calculated value

Badge +16

My apologies it is not available in the calculated value but on a textbox you can specify the default value and use Inline Functions to GetQueryString:

GetQueryString.PNG

if you specifically want it in a calculated value you could point the expression to the named control - that might work.

Badge +9

I wanted to add rule based on the value of query string  and the above inline function was showing blank value also tried with other runtime default values for the textbox but it was still blank. I used the JavaScript to bind the value of the query string to the control and defined the rules in JavaScript. If we bind the  control with query string with js the rules don't get applied as they execute before the value is binded to the control so the rule needs to be defined within js

Badge +16

have you resolved this now then?

Badge +9

Cassy Freeman​.

Yes I am able to resolve. Just wanted to confirm one thing with you.

If I am binding the value of the control "Txtbox" using javascript and create a rule to hide "Txtbox2" depending upon the value of "Txtbox" then the rule executes before my "Txtbox" has value due to which I am using JavaScript to apply validations instead of rule. Is this the default behavior?

Badge +16

Paul Crawford​ - thoughts?

Userlevel 4
Badge +7

Hi Aditya

as Cassy Freeman​ has said above the Query String Parameter should work on a single line text box. I did a quick test and had a rule hiding a field if the query string was populated and it worked fine. If you are doing this through javascript you could try adding

NWF.FormFiller.Events.RegisterAfterReady(function () {  NWF$(document).ready(function () {   }); });

This should then wait for the form to be filled properly before exectuing your code.

Can you post configuration of you querystring paramater and your rule if you want?

Badge +9

Thanks Paul for your reply.

I cant update the code due to some policy. But My question was in other way round. Instead of using the Query String Paramater inline function if I use the JavaScript to bind the value and then add a rule to hide a control based on the value of query string will the rule execute before my value is binding?I think the rule executes just before the Javascript

Reply