I could have just added the Account field to the Custom List data source (and I did that, from Tools > Data Connections) and used that instead of the Name field, but people usually don't know their managers' account names. I did a little digging and found an MSDN forum post that gave me a great way to let users pick friendly display names, which InfoPath would then use to populate a hidden form field with the corresponding account name
Hiding Form Controls
I wanted the field hidden, since users didn't need to see it, so back in my Text Box Properties:
Click Preview one more time to make sure I can't see the field containing the account name anymore - success! Finally, I walked through the File > Publish wizard one last time, making sure to add my new hidden Text Box field to the list of fields to publish, and I was ready to go. Users could create their expense reports in a Forms Library;
- Add a Text Box field to the InfoPath form (Insert > Text Box).
- Right-click the text box and choose Text Box Properties.
- On the Data tab, click the Function (fx) button in the Default Value section.
- Click the Insert Field or Group... button.
- In the Data source drop-down list, select Your Custom List.
- Expand the folders until you see the fields in the User Information List.
- Click the :Account field (you did add it from Tools > Data Connections > Modify, right?), and then click Filter Data.
- In the Filter Data box, click Add.
- In the Specify Filter Conditions box, select Name in the first field, is equal to in the criteria field, and Select a field or group in the third field.
- In the Select a Field or Group box, change the Data source to Main (this is your InfoPath form fields).
- Click the field that contains the drop-down list of display names you created earlier, and then click OK.
- Click OK in all the dialog boxes (shown below) to return to the Text Box Properties.
Hiding Form Controls
I wanted the field hidden, since users didn't need to see it, so back in my Text Box Properties:
- In the Display tab, click Conditional Formatting.
- In the Conditional Formatting box, click Add...
- In the condition builder section, leave the field name selected in the first box, and then select is present in the criteria box.
- Check the box Hide this control, and then click OK.
- Click OK to return to the Text Box Properties, and then click OK to save
Click Preview one more time to make sure I can't see the field containing the account name anymore - success! Finally, I walked through the File > Publish wizard one last time, making sure to add my new hidden Text Box field to the list of fields to publish, and I was ready to go. Users could create their expense reports in a Forms Library;




this is a good idea. I am trying to figure out how to implement this in a way that I can filter a sharepoint list based on user entry. then populate a dropdown based on that filtered source. Any suggestions?
ReplyDeleteRight here is the right web site for anybody who would like to find
ReplyDeleteout about this topic. You realize a whole lot its almost tough to argue with you (not
that I actually will need to…HaHa). You certainly put a fresh spin on a topic that has
been discussed for ages. Great stuff, just wonderful!
my website: diet that works
Wonderful blog уou havе herе but І was wanting to know if you knew of any discussion boards that cover the same topiсs tаlked about in
ReplyDeletethis аrtіcle? I'd really love to be a part of community where I can get comments from other experienced people that share the same interest. If you have any suggestions, please let me know. Bless you!
Here is my web blog: en yeni oyunlar
Υou reаlly mаke іt ѕeеm sо easy ωith youг pгesеntation but I find this mаtter to be really
ReplyDeletesοmethіng that I thіnk I would neѵer understanԁ.
It seemѕ too complicated аnd veгy broаd for
mе. I'm looking forward for your next post, I will try to get the hang of it!
My blog :: bulma oyunları
Very nice post. I just stumbled upon your weblog and wanted tο mention that I have reallу enjoyeԁ
ReplyDeletesuгfing агound yоuг blοg posts.
In any case Ι'll be subscribing for your rss feed and I hope you write once more soon!
my homepage :: ev oyunları