# Auto Entry of characters in Patient Code

**URL:** <https://forum.dimagi.com/t/auto-entry-of-characters-in-patient-code/2564>\
**Category:** Users\
**Created:** [January 19, 2016, 5:34am UTC](https://forum.dimagi.com/t/auto-entry-of-characters-in-patient-code/2564 "2016-01-19T05:34:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Ali](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@Mustafa\_Ali](https://forum.dimagi.com/u/Mustafa_Ali)\
**Post date:** [January 19, 2016, 5:34am UTC](https://forum.dimagi.com/t/auto-entry-of-characters-in-patient-code/2564/1 "2016-01-19T05:34:48Z")

</div>

Hi there!

I was wondering if during data entry of any field, few characters can  
appear automatically, without being typed? To explain it let me give one  
specific example, in my project there is one code, patient identifier code  
which looks like this P-01-G001-234-16. This is composed of 12 apha-numeric  
characters (variable) and 5 dashes (fixed). What I want if P is typed, dash  
(-) will appear automatically, and after typing 01, dash comes again  
without typing it. Can anyone tell me if it can be done and if yes, then  
how it can be done?

Thanks

---

<div class="post-metadata">

**Author:** ![William\_Pride](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/w/b19c9b/32.png) [@William\_Pride](https://forum.dimagi.com/u/William_Pride)\
**Post date:** [January 19, 2016, 4:05pm UTC](https://forum.dimagi.com/t/auto-entry-of-characters-in-patient-code/2564/2 "2016-01-19T16:05:02Z")

</div>

Hello,

Unfortunately I don't believe we have any mechanism that makes this  
possible at the moment.

Best,  
Will

> **···**
>
> On Tue, Jan 19, 2016 at 12:34 AM, Mustafa Ali wrote:
> 
> > Hi there!
> > 
> > I was wondering if during data entry of any field, few characters can  
> > appear automatically, without being typed? To explain it let me give one  
> > specific example, in my project there is one code, patient identifier code  
> > which looks like this P-01-G001-234-16. This is composed of 12 apha-numeric  
> > characters (variable) and 5 dashes (fixed). What I want if P is typed, dash  
> > (-) will appear automatically, and after typing 01, dash comes again  
> > without typing it. Can anyone tell me if it can be done and if yes, then  
> > how it can be done?
> > 
> > Thanks
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sheel\_Shah](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/s/779978/32.png) [@Sheel\_Shah](https://forum.dimagi.com/u/Sheel_Shah)\
**Post date:** [January 19, 2016, 4:17pm UTC](https://forum.dimagi.com/t/auto-entry-of-characters-in-patient-code/2564/3 "2016-01-19T16:17:03Z")

</div>

Hi Mustafa,

I think your best option for now is to add a question list, and then add  
multiple text/number questions inside that question list (for each piece of  
information you want split out). You can then use a hidden value to join  
all the values all together. THe calculation would look like  
concat(/data/question1, '-', /data/question2, '-', /data/question3)

THanks,  
SHeel

> **···**
>
> On Tue, Jan 19, 2016 at 11:05 AM, William Pride wrote:
> 
> > Hello,
> > 
> > Unfortunately I don't believe we have any mechanism that makes this  
> > possible at the moment.
> > 
> > Best,  
> > Will
> > 
> > On Tue, Jan 19, 2016 at 12:34 AM, Mustafa Ali \<[symustafa@pk.mercycorps.org](mailto:symustafa@pk.mercycorps.org) wrote:
> > 
> > > Hi there!
> > > 
> > > I was wondering if during data entry of any field, few characters can  
> > > appear automatically, without being typed? To explain it let me give one  
> > > specific example, in my project there is one code, patient identifier code  
> > > which looks like this P-01-G001-234-16. This is composed of 12 apha-numeric  
> > > characters (variable) and 5 dashes (fixed). What I want if P is typed, dash  
> > > (-) will appear automatically, and after typing 01, dash comes again  
> > > without typing it. Can anyone tell me if it can be done and if yes, then  
> > > how it can be done?
> > > 
> > > Thanks
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "commcare-users" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Sheel Shah  
> Project Manager | Dimagi  
> m: +1.781.428.5419 | skype: sheel\_shah
