How can I capitalize the first letter of the first word of a list?
I would like to capitalize the first letter of the first word of a list.
In this case, the first parameter may or may not be present.
eg Soil description - greyish brown sand vs brown silty sand vs silty sand vs sand, where sand is the primary major conmponent and silty in the secondary major component.
I believe your indent code <<N>> was intended to get the wrap of your second line of assembled text to line up one space from the left margin since a dash will be your first character when this section of the code is activated. It should override other indents set in the text vs depth entity, wrap tab, but I have not played with this so I do not know. I also do not know what the effect of the second force indent code at the end of the statement is. Generally format codes work with the first code turning it on and the second turning it off but indents may work differently. Usually the problem of unexpected indents comes from a missing line continuation character at the end of a line of code (a line continuation character is the underbar and says: treat the following line as if it were on this line but ignore any leading spaces). A misplaced quote can also cause this. I would check these issues carefully before looking into the indent codes.
Hi Domnique,
You could try deleting the Force Indent formatting codes (<<N>>) and see if that fixes the indentation issue.
Hi szang. The reworked code did work however it appears to have added an indent on the first sentence or the sentence wrap is off. I could not see what was causing this based on your code. Any suggestions?
thank you very much for the suggestion I will take a look at the tutorial and if I still have issues I send my files your way.
I have reorganized you code for readability below
<<iif(<<lithology.description>>="No Recovery",_ "No Recovery.", "<<hasdata(<<lithology.soil name>>, "<<b>><<u>><<format(<<lithology.soil name>> (<<lithology.graphic>>),>)>><<B>><<u>> <<listbuildseptrim("," ,_ <<lithology.color>>,_ <<lithology.moisture_content>>,_ <<lithology.density_consistency>>,_ <<lithology.soil_structure>>,_ <<lithology.mineralogy>>,_ <<lithology.description>>,_ )>>",_ "-<<N>>_ <<Ucase1st(_ <<listbuildseptrim("," ,_ <<lithology.color>>,_ <<lithology.moisture_content>>,_ <<lithology.density_consistency>>,_ <<lithology.soil_structure>>,_ <<lithology.mineralogy>>,_ <<lithology.description>>,_ )>>_ )>>_ <<N>>"_ )>>"_)>>
I notice a few things that probably do not matter to the problem you are having:
1. You are using nested quotes on your hasdata function. Function itself is quoted and each argument is quoted. gINT should be smart enough to correctly interpret this
2. You have an extra coma at the ends of your listbuildseptrim function. Again I believe gint will just look for the next argument, find none, and return nothing but it may cause a problem
I believe the problem is the that Ucase1st function only works on a field, not an expression, (or at least that's what it appears to say in my gINT help section) so you need to use my method above. Insert the following instead of your current Ucase1st function and argument
<<Let(descpartial=_ <<listbuildseptrim("," ,_ <<lithology.color>>,_ <<lithology.moisture_content>>,_ <<lithology.density_consistency>>,_ <<lithology.soil_structure>>,_ <<lithology.mineralogy>>,_ <<lithology.description>>_
)>>_ )>>_ <<Ucase(<<Left(<<Get(descpartial)>>,1)>>)>><<Mid(<<Get(descpartial)>>,2)>>_
If you want to force all remaining text to lower case you can add a <<Lcase()>> around the mid function in the last line
I have not tested this and do not guarantee I have all my commas, parenthesis, and delimiters correct.
Hope this helps.