Author Topic: colmodel pq_fn  (Read 2123 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 148
    • View Profile
colmodel pq_fn
« on: June 14, 2019, 03:39:11 pm »
https://yadi.sk/i/ExBZ1ISFSIfCpQ


I want to print the value in "(xxx)" in the "Note" field to another field.

I can find it when I write the value to the cell, but I can't figure out how to do it.

colModel
Code: [Select]
,{title: 'Value', width: 150,dataType:'string',pq_fn: {'=MID(B7,FIND('(',B7,0)+1,(FIND(')',B7,0)-FIND('(',B7,0))-1)'} }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: colmodel pq_fn
« Reply #1 on: June 18, 2019, 10:12:30 am »
Excel formula is probably an overkill for this.

regular expression can be used in column.render or column.formula callbacks to extract value between () of other column.