Skip Ribbon Commands
Skip to main content
Lawyer Management System

Skip Navigation LinksDiscussions List : Setting URL Parameter Value
Use the Discussion list to hold forum-style conversations, including question and answer, on topics relevant to your team, project, or community.

Started: 11/10/2017 11:34 PM
Picture: Jim Hidson
Jim Hidson
Setting URL Parameter Value

​I have received the following questions regarding dealing with SPARK forms URL parameters and how to deal with them:

1. How do I test whether or not the parameter is even present in the URL? I have tried isEmpty()/isNotEmpty() and length() functions but get "Unable to get property 'character' of undefined or null reference" error when I try to save. If I use =='' or !='' then the rule doesn't seem to work either.

2. How can I set the value of a field on the form to what is entered in for the parameter? The setValue() function does not allow getFormQueryString() to be used as the value. I get the same error as in #1.

The Answer:

1-      getFormQueryString('The Parameter')!=null

2-      you have Two ways to do that:
a)

setValue(TextBox5,getFormQueryString('source')!=null?getFormQueryString('source'):'')

b)

try{

setValue(TextBox5,getFormQueryString('source'))

}catch(ev){}

Picture: Jim Hidson
  • Jim Hidson
/my/User%2520Photos/Profile%2520Pictures/jim_MThumb.jpg?t=63627189186" alt="Picture: Jim Hidson" />
Jim Hidson

​I have received the following questions regarding dealing with SPARK forms URL parameters and how to deal with them:

1. How do I test whether or not the parameter is even present in the URL? I have tried isEmpty()/isNotEmpty() and length() functions but get "Unable to get property 'character' of undefined or null reference" error when I try to save. If I use =='' or !='' then the rule doesn't seem to work either.

2. How can I set the value of a field on the form to what is entered in for the parameter? The setValue() function does not allow getFormQueryString() to be used as the value. I get the same error as in #1.

The Answer:

1-      getFormQueryString('The Parameter')!=null

2-      you have Two ways to do that:
a)

setValue(TextBox5,getFormQueryString('source')!=null?getFormQueryString('source'):'')

b)

try{

setValue(TextBox5,getFormQueryString('source'))

}catch(ev){}

111/10/2017 11:34 PM11/10/2017 11:34 PMNoCodes & Scripts
13.8872351624207
12/25/2017 5:38 PM1
Julie Batista
Posted: 2/28/2018 12:39 PM
Picture: Dennis Mingeroet
Dennis Mingeroet

Hi Jim,

I am trying to adapt this kind of rule while using the Spark webpart on a standard SP page.
Is there a way to get the title out of the url? Without the aspx ofcourse. (http://server/sites/Pages/this%20part%20Ineed.aspx​

Picture: Dennis Mingeroet
  • Dennis Mingeroet
/my/User%2520Photos/Profile%2520Pictures/d_mingeroet_MThumb.jpg?t=63627087489" alt="Picture: Dennis Mingeroet" />
Dennis Mingeroet

Hi Jim,

I am trying to adapt this kind of rule while using the Spark webpart on a standard SP page.
Is there a way to get the title out of the url? Without the aspx ofcourse. (http://server/sites/Pages/this%20part%20Ineed.aspx​

Jim Hidson7802/28/2018 12:39 PM2/28/2018 12:39 PM
4/6/2017 5:55 PM