Scripting change to prefix in power table?

Is it possible to change the prefix in a power table by using an extension function (configureCell?)? Additionally, is it possible to pull custom properties (that I defined using an expression function) into the extension functions? Thank you!

Hello,

What is a Power Table prefix? Or what do you mean by that?

What is a custom property that is defined in an expression function? Or what do you mean by that?

Maybe some screenshots showing what you are talking about might help.

Best,

Power table prefix: see first screenshot. Included in the table customizer options. In this case, it is “$” but I want the option to alternate between “$” and “hr” depending on what is chosen in an adjacent cell.

Custom property: In this case, it is a property titled “selectedID” that I created and used an expression binding to pull the selectedID (from SQL table). See second screenshot for code.

Thank you!

Okay, I see.

  1. The prefix is a column in the “Column Attributes Data” dataset. It is only set per column, not per cell. However you can prefix any cell any way you want by using the configureCell extension function. Here’s an example:if colName == "cost": unitType = self.data.getValueAt(rowIndex,"UnitType") if unitType == "Hourly": return {"text": "hr"+textValue} elif unitType == "Item": return {"text": "$"+textValue}
  2. Sure you can reference any custom property in an extension function. For example: self.selectedID

Best,

Thank you Nick! I was able to complete everything I needed to with this help.

Is it possible to insert a property reference on an extension function?