FC12 Flexilayout - remove unwanted rows from table (overlapping data across columns)

I am using FC12 and table blocks for my flexilayout. 95% of my tables are fine on supplier invoices but I have a few instances where the table is very messy and tough to pickup just the rows I need. In this specific instance there is two lots of text above and below my table row that I need to remove or ignore. what are my options here?

I believe I cannot link a repeating group element to my table block and I do not want to complicate the FL or use repeating groups if possible.

I only want to pick up the middle row in the table above. Bare minimum I only need the QTY shipped and Unit cost values.

It seems I have two options. somehow ignore the data in flexilayout or remove them in project setup via scripting.

for option 1 I cannot find anyway in FL to ignore these rows above and below my data. best I can do is pickup all rows and the verification officer will need to remove the unwanted rows manually. Is there any option in my table element I can use to ignore these rows? I have tried just about every setting in the table element.

for option 2 I suppose I would add a event handler to run a script 'after document state changed' - this script would remove any rows without a column value in it for example? BUT, I would only want this to happen on specific supplier alts - do I have access to the service field flexilayout at this stage? So I can use it in my scripting.

My script would go: IF flexilayout = 'altname' and QTYShipped = '' then delete row? is this possible?

how would I go about scripting this. does anyone have any examples I could reference?


Was this article helpful?

0 out of 0 found this helpful



  • Avatar
    Adrian Enders

    If you are using a table in FLS, go into the properties of the table element, and go to the "Rows" tab. Are you setting this to "Detect roes automatically"?

    If so, try this: "Use master columns to detect rows". You have the options to select different columns. Basically this is saying that the selected columns must be present in order to determine a row. Like "Price" or "Total". If data is not found in that row for the columns selected, FLS will not return that row.

    This keeps you from having to script it in Project Setup.

  • Avatar
    Adam Tooker

    I have tried both setting the option to 'detect rows automatically' and using master rows.

    I was under the impression that these settings just denote where the table rows are located, it does not give you functionality to filter out unwanted rows. 

    If I use this example below and set those settings to the first and last column and also qtyshipped, I still get all the rows in verification





  • Avatar
    Adam Tooker

    If I set the master row to just one column like the last column (ex gst) it will just output the entire text as one row.

  • Avatar
    Ivan Diev

    Hi Adam Tooker,

    Both of your approaches are viable.

    For the first option: There are no settings in the 'Table' element properties that will automatically delete empty rows or columns. But it can be done manually by the verification operator.

    For the second option: it is possible to create a script that will automatically delete empty rows in a table.

    In the document definition, you can create a service field that will contain the layout variant ID. See here:

    Then, in the script, you use the condition

    if (Context.Field("service_field_name").Text == "FlexiLayout_variant_ID")


    row deletion script;


    Check an example of a script to delete empty rows here:

  • Avatar
    Adam Tooker

    thank you for the response. I thought this might be the case. My issue is that these rows will not be empty, they will have random data in some of the cells as you can see in the above examples.

    I do currently have a similar script that runs and deletes all empty rows on all documents.

    I only require the unitprice and quantity columns in my table bare minimum. I guess I am going to have to write a script to say:

    for this flexilayout alt - check if the row has data in the unit price and/or quantity cells. if not then delete row.

    does anyone have any similar scripts I could reference where it specifically checks cells in a table for values?


Please sign in to leave a comment.