Template Issues

Hey guys,

Having some problems with a template I’m trying make.

I have a Table with Receiving Forms,
Receiving Forms has a child table that is Form Items Displays
Form Items Displays has a child table Display Lot Numbers.

The issue is in the bolded section below. Not exaccly sure what Im doing wrong.

Vendor:<<[Vendor].[Vendor]>>

Date:<<[Date]>>

Order Number:<<[Order Number]>>

PO Number:<<[PO Number]>>

<<If: Count([Related Form Items Displays])>0>> <<Start: [Related Form Items Displays]>>

Displays Received
Display Type: <<[Display Name].[Display Name]>> <<Start:[Related Form Items Displays]. [Related Display Lot Numbers]>>
Lot Number Amount
<<[Display Lot Number]>> <<[Amount]>>

<>

<>

<>

Any Help would be appreciated,

Thanks,

Solved Solved
0 25 1,607
1 ACCEPTED SOLUTION

I think the issue is that the second START is not matching up with the END.

When you place the START inside of a table, then END must be, I believe, inside as well to properly match up AND I think they need to be on the same table row.

There are two ways to fix depending on your needs

1) First Way
You probably DO NOT want the “Lot Number” and “Amount” column headers to repeat for every row?

If that’s the case, then insert the START in the same cell and before the <<[Display Lot Number>> value AND place the END after the <<[Amount]>> value.

The template WILL look messy but the resulting table should look fine.

2) Second Way
If you DO want the column headers to repeat, e.g. a table for each row then you can change the table to be something like the below where the START is before the table and the END is after the table.

View solution in original post

25 REPLIES 25

Steve
Platinum 4
Platinum 4

First, please post a screenshot of your template. The forum doesn’t format templates well, so we may be missing something without a screenshot.

Second, you didn’t describe what the problem is.

For Some Reason its saying there is somthing wrong with this peice right here. Bold in the post above.

<<Start:[Related Form Items Displays].[Related Display Lot Numbers]>>

Remove the period (.) between the two column references:

<<Start:[Related Form Items Displays][Related Display Lot Numbers]>>

Its Saying there is an unmatched Endif??

Just Tried Placing the end and end ifs in different locations, Same thing.
I did take away the period, that was definitely a mistake, but this I don’t understand.

I think the issue is that the second START is not matching up with the END.

When you place the START inside of a table, then END must be, I believe, inside as well to properly match up AND I think they need to be on the same table row.

There are two ways to fix depending on your needs

1) First Way
You probably DO NOT want the “Lot Number” and “Amount” column headers to repeat for every row?

If that’s the case, then insert the START in the same cell and before the <<[Display Lot Number>> value AND place the END after the <<[Amount]>> value.

The template WILL look messy but the resulting table should look fine.

2) Second Way
If you DO want the column headers to repeat, e.g. a table for each row then you can change the table to be something like the below where the START is before the table and the END is after the table.

Yes this is correct. The Start: & End pair needs to be either inside or outside of that table.

So I changed a few things around, Still getting the same error, this is the new layout

ok, So I changed one more thing, Now that Issue is fixed just by moving the start expression around but Now I am getting some new errors.

Saying it should generate a list of ref values??

I am not certain why the movement of the START fixed the mis-matched ENDIF. I guess if it works for you.

I didn’t see it before since I was focused on syntax, because your first START is already cycling on rows from [Related Form Items Displays], when you get to the second START you are operating on a single row from that list.

So if I understand you data structure correctly your second START simply needs to be like this:

<<Start: [Related Display Lot Numbers]>>

EDITED: By the way, you may find issues with the column alignment not matching from row to row inside the second START. if you do, then you will want to place the the START and END inside the table as I had suggested in the 1) First Way in my previous post

Ok, I got everything perfectly figured out, Just a few small problems/issues.

I can I force a New Page, If an Item will not fit?

See Below How I kinda did it – Other may find it useful. Put as much as possible in Tables to force proper allignment and than just set the border to white. Works Beautiful.

Now My Question is,

If a bunch of Displays get received along with a bunch of Film,
And the Displays stuff all fits on the first page, but the film items only partly fit,
How would I force it to start a second page if its not going to fit?

This is a common problem in ALL reporting systems not just with producing report from AppSheet templates. To dynamically place Page Breaks, there really isn’t a good solution in our templates.

Maybe you could just insert a Page Break before each section so that it always prints on a new page regardless?

What happens if this section inst needed? Will I get Empty Sections?

Wrap the entire Films section in yet another invisible table.

Could you clarify? Like a table in a table?

Exactly.
Put a new single-cell table where the red border is from my screenshot. White borders, cell padding 0.
Cut and paste the entire Film section into it.

@Marc_Dillon

Oh. Awesome idea! So the document won’t split the single cell table. If it can’t fit on the existing page, that single cell table will automatically flow to the next page? Is that the idea?

But wait. The “Film Received” section has a START/END inside of it. What happens if the number of rows inside makes this single cell table larger than a page?

Yes

Then it will split across multiple pages. I believe it still leave a page break after the previous section though.

Yes

Hmm. The new table should be contained inside of the IF -> ENDIF. Sorry, was sloppy with my quick markup. Is that the problem, or did you catch that already? Post a screenshot of the new template?

Yea, I caught that.

I have the If and the EndIf just before and just after the table. Was this an idea or have you made this work, it seams feasible.

Also, is there a way to have multiple templates and than just attach them all together?

Yes, I’ve done this.

No. Or rather, they’d have to be in separate workflows and separate emails/PDFs

Well, I have it working now, and we are confident this will never overflow the first page.
I have to put most of the Ends and if statements on font size 1 to avoid going onto a second page as this would always create a blank page on the pdf.

Its working well now.
The thing is, I want to do somthing else on the 2nd and third page, but dont want them to be dragged back to the first page if the 1st page is only half full, any tips and tricks on this?

Also what could possible be triggering the errors when everything is in tables? Some kind of bug?

Insert a manual page break (in GDoc , Insert-Break-Page Break)

Not sure. I’d have to dive in a lot deeper to figure it out I think. Doubt it is a bug. Keep experimenting!

Ok, So I’m trying this for the film, and the masters. Wrapping both in there own 1 table cell. I may as well do this for Masters as well correct? @Marc_Dillon or am I missing something that I don’t have too.

Edit, Putting everything into a 1 cell table seems to break something. With a table I get this error, taking it back out of a table works again. Did this 3 times And Made sure the formatting and everything stayed the same. Did it for just film as well as for just masters and just film

Im not really understanding why this is happening.

Any Ideas?

Thanks for all your help on this section guys, will mark as solved start a new one with some problems Im having with image links.

Top Labels in this Space