Grooper 21.00.0082 is available as of 12-12-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.1.0016 is available as of 03-15-2024! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.

Question Regarding a Default/Calculate Value Expression

I have a content model that is currently capturing a table with various columns. One of those columns in this scenario is the combined value of a Section, Township, and range. This value is extracted as:

26-05N-06W

I would like to parse this value into three separate fields(Section: 26, Township: 05N, Range: 06W)within my data model.

Does anyone know the syntax for this functionality?

Answers

  • jlunsfordjlunsford Posts: 138 mod
    Try the calculation expression GetFieldInstance("Whatever your combined field is called").Value.Substring(0,2) This would grab the 26 from the example above.  The same with (3,3,) would grab the 05N (7,3) would grab the 06w
  • jlunsfordjlunsford Posts: 138 mod
    also make sure the calculate expression is set to "always set"
  • tmartintmartin Posts: 82 ✭✭
    Will the expression above work for a column within a table rather than a field?
  • jlunsfordjlunsford Posts: 138 mod
    If you're grabbing fields in a table it would just be fieldname.substring(0,2)
  • tmartintmartin Posts: 82 ✭✭
    @jlunsford
       I am grabbing the column values from the table and then parsing them into another table with three columns.. Are you saying the expression should be:
    GetFieldInstance("Whatever your combined field is called").Fieldname.Substring(0,2)

    Maybe we can get on a zoom at some point to look at this...
  • jlunsfordjlunsford Posts: 138 mod
    Get field instance would be to grab something outside the table you're populating but if it's in the table you're populating you would just use the field name.  If you Email support@bisok.com we can set up a zoom meeting
  • tmartintmartin Posts: 82 ✭✭
    I actually worked with Matt on another solution to this problem. I ended up adding more columns to the existing table. The expression works well in this scenario. During export, I'll simply select only the columns I need.Thanks everyone for your help.
Sign In or Register to comment.