Problem with receive connection Infopath - Sharepoint - InfoPath Dev
in

InfoPath Dev

Problem with receive connection Infopath - Sharepoint

Last post 06-17-2009 06:26 AM by warrtalon. 19 replies.
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts: Previous Next
  • 06-11-2009 08:38 AM

    Problem with receive connection Infopath - Sharepoint

     Hello,

    i've a sharepoint's list with AD users(i entered them myself because i didn't success at automatically make them update)and a number of vacation for users, the list is in this form : 


    Users                                  Number of vacation
    DEV\user1                                   5
    DEV\user2                                   7

    My problem is, how can i've the good number of vacation by user, i authentificate the different user in my form without problem, but i don't know how to do for have by example 5 in my number of vacation if i'm user1, i did a data connection to the sharepoint list but now i don't know how to proceed ....

    I'm using infopath 2007 and MOSS 2007

     Thanks in advance

     

    ps : also, anyone know how to list all AD member into a infopath's form or sharepoint's list (without buying something) ?

  • 06-11-2009 01:52 PM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    Hi HttpPointCom,

    Have you tried filtering the list? In IP2007 you can get the username without code (there's a username function). Just set a field in your form to that function and then use that field to filter the list returned from ShP. You might have to prepend the "DEV\" stuff to make the equivalence test work.

    IP comes with a Contact Selector control which is free but since it's an ActiveX it will require installing on clients. There are numerous code samples of Active Directory related functions in this forum. Just search. It will probably cost you more time (=money) to code it and debug it than to just buy Qdabra's AD Web Service. However, you don't really want to enumerate all AD members since for big domains, that could have negative performance ramifications.

    Patrick Halstead
    Project Manager at Qdabra
  • 06-12-2009 02:11 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    Hi,

    thanks for your response,

    i did the field with the username function, my connection to the list is ok because i created a table which return me the list. How do you suggest to use this field ? i created a blank field for returning the username, so the rule that i applied is 

    user is the field with the username function

    @vacation is the number of vacation in the sharepoint list

    @usera is the name of the user in the sharepoint list

     @vacation[User = @Usera]

    with advanced xpath it's : 

    xdXDocument:GetDOM("Testo")/dfs:myFields/dfs:dataFields/dfs:Testo/@vacation[xdXDocument:get-DOM()/my:mesChamps/my:User = xdXDocument:GetDOM("Testo")/dfs:myFields/dfs:dataFields/dfs:Testo/@Usera]

    it's always returning the first number of vacation of the sharepoint list, event if i'm user1 or user2 or user3 etc ..... i don't know what i did wrong

    thanks in advance

  • 06-12-2009 07:51 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    It may be that the userName() function returns just the username (Testo) and not the domain name (dev\Testo).  Did you already resolve that part?  I noticed you reference the full domain name in the first post, but I know that userName() does not include the domain.

    Anyway, did you manually create the table in your form, or did you just drag the main List folder from your secondary data connection and let it create its own repeating table?  If you do it that way, then it will automatically show all the records in a repeating fashion when querying the data connection.  Then, you can set conditional formatting on that repeating table to only hide the control when User != Usera.  This will make it where the user see the repeating table with only one record - the record showing that user's vacation days.  The downside is this always downloads all the records just to show the user one record.

  • 06-12-2009 08:28 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

     Hi,

    yes i resolve the dev\ thing.

    About what you suggest, seeing only current's user vacation doesn't let me using it, if i make a blank field with value = usera it will still show the first(event if hidden) vacation, and i need to you this vacation number for calculation. Anyways thanks for this it will be useful for me for an another utility.

  • 06-12-2009 08:44 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    I don't really understand the problem, but if you attach the XSN, we could probably troubleshoot it.  You should be able to set the conditional formatting so that YOU as the administrator see everything but regular users only see their one record.  That way you can do what you need to do.  If you do the method I said, it will not show the first record always - it will only show the record that is relevant to the current user (other than you).

  • 06-12-2009 09:07 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

     Sorry, i badly explain my problem, showing the current user vacation = OK, but this is not what i want to do, i want to use the current user vacation for my form, because i will do a calcul to this vacation then i will submit the new vacation number.

  • 06-12-2009 09:41 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    Ok, I got it.  That should be very easy.  Attach your XSN, and I'll show you.

  • 06-13-2009 09:54 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

     

    i tried many things without success, I hope you'll do better.
  • 06-13-2009 12:45 PM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    Ok, I see what you're doing in the form, and I see what is happening.  What I don't know is what you want to do with the vacation days.  I don't see a calculation.  I just see a radio button that sets itself to the value of 1, and then you have a rule that sets another text field to the value of the vacation days (filtered unsuccessfully by username).  I can get this part to work so that the number in champ2 is correct, but what is it you want to do after that?  All you're doing so far is duplicating your info for username and vacation days.  You also never added the conditional formatting to the repeating table that I mentioned...or you added it and removed it.  I added it, and it works.  I also can get the champ2 value to always reflect the current user's NombreConge by setting its default value instead of using a rule.

  • 06-14-2009 05:45 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    This is why the form i posted here is call " test ", it's not my whole work. In my real form i use this vacation number, then i calculate the workday between 2 datepickers, and i do vacation number - workday calculated = new vacation number, then i'll send it. Of course, i've a type of vacation to choose etc.. and an approbation by a manager, so with the submit button i'll add a rule, if approbation statut is " approbated " then send the new vacation number of current user to the sharepoint list.

    How did you do for having the number of vacation of the current user ? do you know the rule for doing the submit to the vacation of current user ? Can you post the .xsn with the updated you did please.

    thanks for you time, you help me a lot.

  • 06-14-2009 08:48 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    I made a lot of changes to what I saw based on how I would build the form, so the XSN I have is not necessarily what you'll want.  I think the main thing to do is what I mentioned about using a default value on champ2 instead of a rule to populate it.

    Set the default value of champ2 to the exact same value that you are using in your champ3 rule set:

    NombreConge where Usera = Utilisateur

  • 06-15-2009 12:01 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

     I really like to see the .xsn you have because i did the change you suggest and it still doesn't working .... i set the default value to champ2 ->

     

    xdXDocument:GetDOM("Testo")/dfs:myFields/dfs:dataFields/dfs:Testo/@NombreConge[xdXDocument:get-DOM()/my:mesChamps/my:Utilisateur = xdXDocument:GetDOM("Testo")/dfs:myFields/dfs:dataFields/dfs:Testo/@Usera]

     I also try with NombreConge[usera=utilisateur] and same result ...

  • 06-15-2009 09:34 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

    Ok, I will try to take your current XSN and make the changes within it and re-attach.  The problem is that for me to test, I have to setup my own environment and change all the data connections.  That's what I did on my test form.  Now, I'll just make the changes to your form so that you can test in your environment.

    So, please attach the current version of your XSN or a test version of it based off your current rule settings.

  • 06-16-2009 08:19 AM In reply to

    Re: Problem with receive connection Infopath - Sharepoint

     Right, i resolve this problem this problem, now the thing is i want to submit to the sharepoint list the new vacation, i found this :

    http://blogs.msdn.com/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx

    but it will be complicated to integer this to my form, i would like to know if there are other methods to submit to a sharepoint list

Page 1 of 2 (20 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.