How to make the perspective table the same function as vision power table configure Editor


in vision power table I can change the column data by dropdown list

	if colName=='DefectPostion':
		return {'options':[(u'',u'无缺陷'),(u'Splice',u'拼接区内'),(u'Body',u'拼接区外')]}
	if colName=='DefectType':
		return {'options':[(u'',u'无缺陷'),('K',u'K=凹陷(表面,挤出线,肩部)'),('F',u'F=线型痕迹,表面气泡'),('G',u'G=切割线,表面切割出现色差'),('HTC',u'HTC原材料'),('OSH',u'OSH原材料'),('CSO',u'CSO客户返修'),('A',u'A=表面光洁度,表面色差,表面异物'),('B',u'B=带体变形,或拱起,或表面起伏'),('C',u'C=滑动层织物缺陷(一般是滑动层织物供应商的缺陷)'),('D',u'D=滑动层织物在唇口变形,起皱,或打折'),('E',u'E=长度错误'),('H',u'H=切削错误,挤出线切削错误'),('L',u'L=帆布皱')]}
	if colName=='Cmode':
		return {'options':[('X','X'),('2X','2X'),('3X','3X'),('S','S'),('R','R'),('CZX','CZX')]}

the code like upside, is this function also can be valid in perspective table?

I have try use view path this dropdown function is not what I have in vision.

  1. On the SELECT view create a view parameter called ddOptions (or whatever you like).
  2. Create a property binding on props.options to view.params.ddOptions.
  3. In your table you need to pass parameters to the table's props.columns.1.viewParams. This will be in the form of a list of dictionaries like so:
[
  {
    "value": 1,
    "label": "Item 1"
  },
  {
    "value": 2,
    "label": "Item 2"
  }
]


I am new to perspective, I come to step 3, and how to pass the parameters to that view parameters?