Solved

Inconsistant Issues with Paramaters - RootwebUrl / Source / SubsiteRelativeURL

  • 2 January 2020
  • 3 replies
  • 2 views

HIa,

 

I have struggling a bit with getting these parameters to work 'consistantly: RootWebUrl / Source / SubsiteRelativeURL

On some forms/views they show succesfully (I test with a Data Label to show the value) and on some forms/views they return no value at all.  At first I though they maybe only worked on the the 3 OOTB forms that K2 produces, but I've added them to custom forms built from scratch before and it returned the correct value?

These are essentail parameters to our environment as we produce solutions on test/dev and then deploy to live and this functionality means we don't have to hardcode urls's into the 'navigate to url rules etc.

Question:
Can someone explain how these parameters are designed to work?... I have been assuming they were a 'system function of K2' in that if you called a parameter by this specific name, it does something automatically in the background tio pull it in? (like the ID does)

 

What is the correct porotocol for using these and/or am I missing something?

 

Thanks, Julie

 

 

icon

Best answer by JulieBird 3 January 2020, 18:48

View original

3 replies

Hello,


 


Which version of K2 are you using?  Perhaps you could attach a couple of screenshots illustrating how you are currently using these parameters?


 


Thanks.

Userlevel 6
Badge +16

Hi JulieBird,


 


I think the parameters are part of the query that will be used to construct the Smartforms URL for Display/Edit/New form. In this example, I capture the browser url when loading 'New list' form, I think the parameters are getting from K2 hidden list of the site, it's then passing down to form level via 'form initializing' event. Are you getting these parameters at the form rule level before transferring it down to view level? Is it specific to certain view when you try to get these values?  


 


https://portal.denallix.com/subsite1/K2Pages/NewForm.aspx?targetUrl=https://k2.denallix.com/Runtime/Runtime/Form/Newportal__denallix__com__subsite1__Lists__Test__List1__for__Subsite1ItemForm?UIV=15&List=a920fe91-5e8c-4830-a8a9-4dfa7422b7ab&Source=https://portal.denallix.com/subsite1/Lists/Test List1 for Subsite1/AllItems.aspx&RootFolder=&Web=591b4295-7a2f-4b5e-9c62-d3949ec43049

 


Rootweburl: https://portal.denallix.com


Source:https://portal.denallix.com/subsite1/Lists/Test List1 for Subsite1/AllItems.aspx


SubsiteRelatvieURL: subsite1


 

Hi Both,

 

Thanks for the replies, am using K25 latest version, its interesting to hear that the parameters are coming froma hidden list which is what I was thinking it must do, so as long as I create these parameters withthe exact same name they should pull this in automatically.

 

My issue seems to have resolved a day later because the paramenters I set on the form (rootweburl/subsiterelativeurl) are now returning a value (which i had tested yesterday several times by showing it an an expression though a data label and it consistantly showed a null value!!!).

I am wondering if this maybe a caching issue, and explains why sometimes it works and sometimes it doesnt?

I'll keep my eye on this when it happens again.

Thansk for confirming it 'should work' .. thats an important step toward me trouble shooting incase it happens again.

Julie :-)

 

Reply