Rainy Pass Posted April 3, 2008 Posted April 3, 2008 How do I add field data to html code? I have a database of products that exports an excel file used to upload information into an e-commerce site. I would like to include a field, in each record, that combines html code and the data from a couple of the other fields. I am trying to combine some static code with data that changes with every record. i.e., html text "Colors:" with the data from a field containing the available colors. How do I do this?
CobaltSky Posted April 3, 2008 Posted April 3, 2008 Hi Rainy Pass, The most common way to build a dynamic block of data (text or html etc) is to put the boilerplate/template for your text (html) into a global field and insert unique place-holder values into the html wherever you want a field value to be inserted. For example: [color:gray]Your html has a [[datafield]] in it here and a [[namefield]] there... Then, to have the contents of the relevant field appear instead of the placeholder, in each record, define a calculation field with a formula along the lines of: Substitute( YourGlobalField; ["[[datafield]]"; YourTable::DataField]; ["[[namefield]]"; YourTable::NameField]) With this calculation in place (and ready to be exported) the tagged placeholders in your global field text will be replaced with actual field text on each record. }:(
Recommended Posts
This topic is 6069 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now