December 4, 201213 yr Hi I have attach a FM file in a zip... And have snippet that does nothing but show my problem, for step through with debug Basically I have a HTML page or my Invoice format And , then through substitution command, I fill the format with data This might even be a Html question.. not that familiar with its side <div neither </div> All the previous older lines of code work.. in my script except the last 2 new lines. Code was written long ago by another. still does except added new fields for counting 'Texting' or displaying new field counter to invoice format Testing, debugging, I add this new texting field by cut pasting the 'paging code' another similar field counter that worked same, by using Dreamweaver my editor... I think the problem is of the first line of code... the template. I not sure how this was all created in the first place or maybe some elements are missing ID or titles same but part of attached Invoice form SNIPPET <div style='POSITION: absolute; TEXT-ALIGN: right; WIDTH: 101px; FONT-FAMILY: Arial; HEIGHT: 15px; FONT-SIZE: 10px; OVERFLOW: hidden; TOP: 421px; LEFT: 85px'>Ref: time on account</div> <div style='POSITION: absolute; TEXT-ALIGN: center; BACKGROUND-COLOR: #ffffff; WIDTH: 51px; FONT-FAMILY: Arial; HEIGHT: 15px; FONT-SIZE: 10px; OVERFLOW: hidden; TOP: 403px; LEFT: 319px'>40:00</div> Then code has these substitution commands to lay the data to form Substitute ( $inv_text; "[acc_billing_texting_count]"; fnNumberFormat ( Billing::acc_billing_texting_ count; 2 ;"." ; ",")) that's all testSub_Html.zip
December 4, 201213 yr The square brackets are for doing multiple substitutions. Substitute(text; [search1; replace1]; [search2; replace2]; ... [searchN; replaceN]) Your script steps are commented out because they are not written properly. See: http://www.filemaker.com/11help/html/func_ref3.33.84.html#1031764
December 4, 201213 yr Substitute ( $inv_text; "[acc_billing_texting_count]"; fnNumberFormat ( Billing::acc_billing_texting_ count; 2 ;"." ; ",")) In your example, the square brackets are not used for anything; they are simply part of the search string.
December 5, 201213 yr Author First thanks for your reply, usually I post it and figure it out b4... I am grinding on this one... probably cause i don't understand CSS.. I understand subst pretty well Its the rest of the code or the populating my data in form,, substituting within the Htlm <Div> objects in html template. <Div </Div> to find the one to substitute on.. as the good code suggest, subst code for original code seems to work, its just my 2 lines of code I added duplicating doesn't work
December 5, 201213 yr Author Conclusion for me... I finally figured subst (x; "[name]" the [] is part of the search.. The form created in dreamweaver would actually have [name] [company] [address1] in it.. The Absolute Call in the <Div or html code puts the data at the right xy location on page My problem in the one piece of code retesting it, I guess it never really worked when tried in other account## And real problem was the creation of the template form .. once figured, the subst command found the right spot in $inv_text Thks
Create an account or sign in to comment