Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2006

Tip: Looking for answers? Try searching our database.

Eliminate Red (Required Field) Asterisk?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikeg - 27 May 2006 15:23 GMT
When a using a database as a data source, controls display a red asterisk in
required fields. In this case, we’re using a Master/Detail control, but
submit is disabled because it’s intended for use as a query-only form.
Anyway, the red asterisks show up in required fields in both the master and
detail sections.

Is there a way to stop the red asterisk from displaying?

Thanks,
mikeg
~~~~~~~~~~~~~~~~~~~
Those who give up freedom in exchange for security usually end up with
neither. - Benjamin Franklin
Kalyan Reddy - 29 May 2006 09:24 GMT
Hi Mikeg,

There is a workaround discussed in the following Lin
http://msdn.microsoft.com/newsgroups/default.aspx?&query=Remove+red+&lang=en&cr=
US&guid=&sloc=en-us&dg=microsoft.public.infopath&p=1&tid=8473ad36-0ecd-485d-a531
-e7f2f27622bb


I hope this will be helpful to you.
Signature

Kalyan Reddy
Visit http://www.autonomysystems.com

> When a using a database as a data source, controls display a red asterisk in
> required fields. In this case, we’re using a Master/Detail control, but
[quoted text clipped - 9 lines]
> Those who give up freedom in exchange for security usually end up with
> neither. - Benjamin Franklin
mikeg - 29 May 2006 14:52 GMT
Kalyan, thanks for the suggestion. However, this solution appears to require
modification for my case. The relevent XML schema (in this case schema1.xsd)
is using "attribute" tags for each field in the ADO connection. The solution
on MSDN refers to using nillable="true" in "element" tags. Using
nillable="true" in an attribute tag causes an error (at least when I tried
it).

Being kind of new to all this, I could be missing something obvious. Here's
part of the schema in case someone can point out where to modify it to
eliminate red asterisks in the PATIENT_ID field:

xmlns:d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields">
 <xsd:element name="PATIENT">
   <xsd:complexType>
     <xsd:attribute name="PATIENT_ID" type="xsd:int" use="required"/>
     <xsd:attribute name="LAST_NAME" use="required">
         <xsd:simpleType>
             <xsd:restriction base="xsd:string">
             <xsd:maxLength value="30"/>
             </xsd:restriction>
         </xsd:simpleType>
     </xsd:attribute>
...[more fields]...
     <xsd:anyAttribute
namespace="http://schemas.microsoft.com/office/infopath/2003/adomapping"
processContents="skip"/>
   </xsd:complexType>
 </xsd:element>
Kalyan Reddy - 30 May 2006 06:19 GMT
Hi,

Try removing use="required" from the
<xsd:attribute name="PATIENT_ID" type="xsd:int" use="required"/>
     <xsd:attribute name="LAST_NAME" use="required">

Signature

Kalyan Reddy
Visit http://www.autonomysystems.com

> Kalyan, thanks for the suggestion. However, this solution appears to require
> modification for my case. The relevent XML schema (in this case schema1.xsd)
[quoted text clipped - 24 lines]
>     </xsd:complexType>
>   </xsd:element>
mikeg - 30 May 2006 08:21 GMT
Yeah, I thought that was a good idea too. To be more precise, I tried
changing  use="required" to use="optional" which is how some fields in the
data connection are set--corresponding to columns in the underlying View that
are allowed to be NULL.

Unfortunately that didn't have any effect. The red asterisk was still there.
Also I noticed other non-key fields in the data connection where
use="required", but there is no red asterisk. I would think InfoPath is
inserting the asterisk when a field is a key, but the only other control
being marked with this asterisk is SSN which is NOT a key in the underling
table!

It would be nice if Microsoft would expose the logic behind this cosmetic
anomally. Or maybe they have and I just haven't found it yet. Thanks again
for some good suggestions.

> Try removing use="required" from the
> <xsd:attribute name="PATIENT_ID" type="xsd:int" use="required"/>
[quoted text clipped - 31 lines]
> >     </xsd:complexType>
> >   </xsd:element>
Josiah Smith - 11 Aug 2006 23:09 GMT
This may help you.  I had the same problem with cloning nodes of base64 type.

Go to infopathdev.com
(http://infopathdev.com/howto/examples/default.aspx?i=cd6b81a217de40a1b249ab42fcff0216)
and download the form "Identifying a Filtered Table Row Number, v1.0" and
read over the setnil function in their script file.

I've found that you have to use the same thing for a Date field when
programatically creating a node, as well as the aforementioned base64
(picture) to set them as 'blank'.

HTH,
Josiah Smith

> Yeah, I thought that was a good idea too. To be more precise, I tried
> changing  use="required" to use="optional" which is how some fields in the
[quoted text clipped - 47 lines]
> > >     </xsd:complexType>
> > >   </xsd:element>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.