I need to be able to copy a category of a view (with subcats) into a rich text field programatically. I can’t use an embedded view because this document needs to be printed and will run several pages - I can’t size the embedded view to work that way. Any ideas or pointers? I’ve done some searching but have been unable to come up with anything that really meets my needs.
Subject: View into field table
Bill,
Is there any reason you cannot create dymanic table using LS
John
Subject: RE: View into field table
Uh, no, I guess that’s the way to do it. One thing about LS tables, I can’t seem to figure out how to set the lines to 0. Am I missing something…?
Subject: RE: View into field table
Bill,
I never tried to set them to zero. I did it the way of dynamic tables, but not with the new. Hopefully somebody has an answer.
John
Subject: RE: View into field table
There’s no option in LS to do that (at least not natively). However, you can create a “seed” table in a rich text field on a retrievable document that has the border options you want, then use AppendRTItem to put the table onto the current document. From then on, any of the rows you add will inherit the borders setting from the “seed” table.
Subject: RE: View into field table
OK, thanks (I sort of figured that out with more research) - that could work.
Subject: RE: View into field table
OK, what am I doing wrong? Everything works fine with a body.appendtable… But when I use body.AppendRTItem… and copy in the table from a profile doc it doesn’t work. I don’t seem to be able to get a handle on that appended table?
Subject: RE: View into field table
Did you update the RTItem after the append?
Subject: RE: View into field table
Yes… I’m getting “Element or Navigator is invalid.” Shouldn’t I just be able to access the table that I’m appending from the other rich text field just like I’ve been accessing the table I create?
Subject: RE: View into field table
The RTNavigator may be stale if you created it before appending the table and updating the item. Try holding off until after the append and update.
Subject: RE: View into field table
Yeah, I’m creating it after the append. I must be missing something stupid. I can manage to get 2 tables in the doc. I can get my properly formatted table to show up either before or after my created table, but unless I create the table I get that error message. And whether I append the properly formatted table or not, my data still all ends up in the wrong place. What the heck…?
Subject: RE: View into field table
Ends up in the wrong place how? Can you post what you’ve got?
Subject:
Subject: RE: View into field table
By “wrong place” I meant that the data ends up in the improperly formatted table, whether that table shows up first or second, depending on when I bring it in. But I get an error if I don’t create the table in my script. I’d post my script here but it’s kind of long with a bunch of other stuff in it! What I need is a clean example of how to seed a table from another document.
Subject: RE: View into field table
Kinda long or not, I’d rather see yours than extract mine, know what I mean?
Subject: RE: View into field table
I don’t know if this is helpful enough, but this is part of it, with line numbers:
1 Call body.AppendTable(1,3,styles)
2 Call body.AppendRTItem( profileBody )
3 Call body.Update
4 Set rtnavBody = body.CreateNavigator
profileBody contains the properly formatted table. If I comment out line 1 I get an error. If I leave it in, I get 2 tables, with my data in the table created in line 1. If I move line one down to line 3 (after the other table), I still get my data in the improperly formatted table. What gives? I can’t seem to access the imported table.