Jump to content

Need to add html tags


This topic is 3054 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi, I think what I'm trying to do is similar to the post here : http://fmforums.com/topic/43137-creating-html-templates-using-data-fields/#comment-201362 but expanding the idea quite a bit.

I'm adding products to ecommerce site Volusion. Eventually, I'm moving the site to the Magento platform. I've been using Excel and the concatenate function, however, I'm seeing the time saving benefits of using FM12Pro but hung up on adding fields that contain html tags and populating them with attributes. I've attached a text file that more fully explains.  Thank you for your assistance. We lost a member of our team and We're just trying to get all the work done.  I'm also attaching, what we've done thus far. In the layout I want to add sections for Features, Technical Specifications and Includes which will contain the html tags.  The database contains some products for example. Ultimately, what we want to create is a technical specification Attribute Table. And tell it If Attribute 1 exists then output it to <li>1</li>, <li>2</li> and so on. (I'm not exactly clear on how to do that) Also, if the Attribute doesn't exist, I want it to continue to check for attributes 4,5 and 6 and so on.. Or, maybe the LIST() function, and tell it somehow if the attribute doesn't exist, e.g., empty tags <li></li>, delete the empty tag. Eventually, I expect to have hundreds of attributes to pull information from to populate the various fields that contain the <li></li> tags. We created the "html" field  to see what it looked like. So, I guess the question here revolves around the use of the CASE function maybe...or the IF function. An example of attributes would be M12, M18, M24 which describe certain models of tools, Voltages, Amps, chuck sizes, rpm, corded or non-corded, diameter, etc. I'm just learning FileMaker and kind of figuring it out as I go...thank you for your patience.

hmm, apparently I couldn't delete one of the files...

 

adding html to fm fields.txt

DynamiteTool.fmp12

DynamiteTool.fmp12

Edited by cliftz
specify/clarity
Link to comment
Share on other sites

  • Newbies

Okay, I see.

I'd would like to create a specification field. This field will contain a calculation that lists  data from six different fields. The problem that I have is when a field is empty it still shows on my list.  I was wondering if I can Create a CASE or calculation in which if the attribute is empty it does not get added to my list.

e.g.,: <li>attribute1</li>
         <li>attribute 2</li>
         <li>Attribute5</li> if attribute3, attribute4 are empty fields. other wise

         <li>attribute 1</li>
         <li>attribute 2</li>
         
<li>attribute 3</li>
         <li>Attribute 4</li>
         <li>Attribute 5</li>

 

Link to comment
Share on other sites

Let([

a = attribute 1;
b = attribute 2;
c = attribute 3;
d = attribute 4;
e = attribute 5

];

"<li>" & Substitute(List(a;b;c;d;e); "¶"; "</li>¶<li>")  & "</li>")

Hope this helps!

Link to comment
Share on other sites

This topic is 3054 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.