Liquid UI - Documentation - 10.20 Passing values to a web server using _connectiondata

10.20 Passing values to a web server using _connectiondata


Prerequisites


Purpose

The '_connectiondata' system variable is used to enable scripts to access URL queries and pass them as parameters to Web Server.


User Interface

An HTML page of sample URLs are shown in the following screenshot. Each URL contains some parameters that will be accessed by the script.



Liquid UI Script

The full example script using '_connectiondata' is shown below.

println('Executing Web UI Scripts..........');
try{
	println(_connectiondata);
	var obj = eval("(function(){return" + _connectiondata + ";})()");
	println('Priniting objec: '+obj);
	var task;
	println('-----------------------------------: ' + obj.task);
	if(obj.task){
		switch(obj.task){
			case 'T1':
				if(obj.user && obj.pass){
					set("F[User]",obj.user);
					set("F[Password]",obj.pass);
				
				enter({'process':goto_va01,"using":{"tcode":obj.tcode,"ordType":obj.ordType,"soldto":obj.soldto}});
				break;
			
			case 'T2':
				if(obj.user && obj.pass){
					set("F[User]",obj.user);
				enter({'process':goto_va03,"using":{"tcode":obj.tcode,"order":obj.order}});
				break;
			
			case 'T4':
				task = obj.task;
				break;
			
			case 'T5':
				task = obj.task;
				break;
			
			case 'T6':
				task = obj.task;
				break;
			
		}
	}
}
catch(e){
	println(e.description);
}

function goto_va01(param){
	onscreen '*'
		enter(param.tcode);
	
	onscreen '*'
		set('F[Order Type]',param.ordType);
		enter();
	
	onscreen '*'
		set('F[Sold-to Party]',param.soldto);
		enter();
}

//Sample : 100000205
function goto_qpr2(param){
	onscreen '*'
		enter(param.tcode);
	
	onscreen '*'
		set('F[Physical sample]',param.sample);
		enter();
}

function goto_va03(param){
	onscreen '*'
		enter(param.tcode);
	
	onscreen '*'
		set('F[Order]',param.order);
		enter();
}

Can't find the answers you're looking for?