Load data from another list based on logged user's Manager - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Load data from another list based on logged user's Manager

Last post 07-31-2020 03:46 PM by Hilary Stoupa. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 07-29-2020 12:18 AM

    Load data from another list based on logged user's Manager

    Hi , My requirement goes like this .. 1) I have a backup manager list with following fields a) Reporting Manager(PeoplePicker) b) Backupmanager(PeoplePicker) c) Is BackupManager Present(dropDown with yes or no options) 2)In my main form i am fetching a) Requestor(current logged in user) b) Reporting Manager (current looged in user's Manager) If ‘Reporting Manager’ name exist in BackupManager list and Option field = ‘Y’ then Display Reporting Manager field as Back up Manager name Else Display Reporting Manager field as Reporting Manager name from AD. I tried but filter functionality is not working.
  • 07-29-2020 10:13 AM In reply to

    Re: Load data from another list based on logged user's Manager

    Can I see a copy of your form? You can attach it under the Options tab in a reply.
    Hilary Stoupa

  • 07-29-2020 11:00 AM In reply to

    Re: Load data from another list based on logged user's Manager

    Please find the attached template
  • 07-29-2020 11:25 AM In reply to

    Re: Load data from another list based on logged user's Manager

    Can you direct me to where these rules are? You mention "Option field = Y" but I'm not sure if that is in the main data source or in the secondary. When should this backup logic be running? In the Form Load rules where you set the requester and manager?
    Hilary Stoupa

  • 07-29-2020 11:37 AM In reply to

    Re: Load data from another list based on logged user's Manager

    Hi Hilary , Sorry I have uploaded the template where i have used XML connection using GUID. But its not working. I have wrote rules on the Reporting Manager Field , Since conditions was not working. So i have set field26 to get the drop down value i.e yes or no and based on that rule i am setting value of backup manager. Please find the attached template.
  • 07-29-2020 02:24 PM In reply to

    Re: Load data from another list based on logged user's Manager

     Do you get the value you anticipate in field26? I don't see any rules on field26 that would set any other fields.

    I'm having a very hard time trying to understand the goal here (or really, the point?) So - if the user's reporting manager is in the Backup Manger list, in the Reporting Manager column, and ReportingManagerAvailability is equal to true in the Backup Manager list, populate the "BackupManager" field in the main data source of the form with the Reporting Manager's account info, otherwise populate the Reporting Manager people picker in the main data source with the reporting manager?

    Is ReportingManagerAvailability a choice column with "yes" and "no" as options? Or is it a true / false (yes / no) column in your list? Are you trying to see if the current Reporting Manager is in the Reporting Manager column in the Backup Manager list? Or in the Backup Manager in the Backup Manager list? 

    In terms of filters "not working" - usually for me that's because a field isn't the value I'd expect. I'd encourage you to put the data fields from the Backup Manager list connection on your form so you can see the returned data. 

    Hilary Stoupa

  • 07-29-2020 10:51 PM In reply to

    Re: Load data from another list based on logged user's Manager

    Maintain ‘Backup Manager name’ and ReportingManagerAvailability( dropdown field Yes or No). To display Reporting Manager field if entry exist for the Reporting Manager in List else extract from AD Reporting Manager. If ‘Reporting Manager’ name exist in List and ReportingManagerAvailability(dropdown field Yes or No) then Display Reporting Manager field as Back up Manager name Else Display Reporting Manager field as Reporting Manager name from AD. I have tried couple of scenarios with the people picker but wasn't working for me so i have taken a text box with the backup manager but not working its only fetching top most value from the list if backup manger is Yes.Not checking AccoundId of reporting manager from both the lists. The condition works for current logged in user but not for its manager. Since i am new to infopath form i might have missing something which i am not able to rectify. in Field26 i am trying to fetch yes or no value based on filter condition where AccoundId of Reporting Manager in Backuplist is equal to AccountId of Reporting list from my main connection based on field26 (Yes or no)i am updating Backupmanager in the form.
  • 07-30-2020 08:43 AM In reply to

    Re: Load data from another list based on logged user's Manager

    When you test your form as is, what is displayed in field26? Please remember that XPath is case sensitive, so "Yes" and "yes" are not the same thing.
    Hilary Stoupa

  • 07-30-2020 01:20 PM In reply to

    Re: Load data from another list based on logged user's Manager

    I added a few things to this copy that might help you figure it out. I added a form load rule that may help get the reporting manager - you'll see I'm setting the query field prior to running the query. I put the backup manager list data on the form for you so you can see it. I added an expression box that gets the Backup manager if the reporting manager is in the form and their availability is = No. Save the linked file locally, right click and select design to open the template in design mode.
    Hilary Stoupa

  • 07-31-2020 10:31 AM In reply to

    Re: Load data from another list based on logged user's Manager

    Hi Hilary, Thanks for your response but I think my requirement is not clear. I want to fetch Back up Manager from the Backup List if the dropdown selected is Yes and if reporting manager (BackupList) is equal to reporting Manager (GetUserByProfileName). When i tried to fetch the value based on condition its only checking the dropdown value and not if reporting manager (BackupList) is equal to reporting Manager (GetUserByProfileName).
  • 07-31-2020 03:46 PM In reply to

    Re: Load data from another list based on logged user's Manager

    Probably easiest to just use query fields for this. Set the Reporting Manager query field in the list data connection to the account id of the reporting manager. Set the dropdown (whatever field in your list that is) query field to Yes. Then run the query. That way, if you get a row back you don't have to add XPath filters. That may be a simpler approach for you. Put the query fields on your form. Put a button on your form that runs the query. Then you can experiment and see what data you get back with different combinations.
    Hilary Stoupa

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