[Bug-13088,13252]Popup Views Fail To Interpret Parameters Which Are Objects Or Arrays

Right, but you’re supplying a Model.ShiftInstanceBreak object.

my_dict = dict()
my_dict['duration'] = 10
my_dict['name'] = 'Morning'
params = dict()
params['test_object'] = my_dict
system.perspective.openPopup("tLEtjaMm", "Test", params)

would send your data through.

1 Like

Hi All, Is this problem solved? I’m on version 8.1.2 and I couldnt pass dataset as a parameter to a popup window.

Datasets as popup parameters was repaired in 8.1.4. (Bug #1083 for reference) See this post.

Thats great. Thanks.

Hi,

I have the same problem with jsonEncode function passing in an array variable to prepare an INSERT SQL.
Error concern the try statement.

jsonConfig = system.util.jsonEncode(config)
						
try:
	insert_params=[
		inputs['usage_basic']['title'],
		inputs['usage_basic']['description'],
		inputs['project_id'],
		inputs['physical_output']['physical_id'],
		inputs['usage_basic']['usage_basic'],
		inputs['isUserUsage'],
		inputs['service'],
		jsonConfig
					
	]
except:
	return {'state':False,'message':u"Une variable d'insertion est manquante.","outputs":[], "meta":features.msgMeta(False)}

cols="("
values="VALUES("

insertCols=['title','description','project_id','physical_id','usage_basic','isUserUsage','service','config']
			
for col in insertCols:				
	cols=cols+col+","
	values=values+"?,"
			
cols=cols[:-1]+") "
values=values[:-1]+")"
			
			
query="INSERT INTO admin.usages_used "+cols+values

usage_id=system.db.runPrepUpdate(query,insert_params,tx=txId,getKey=1)