Display corresponding "name" value to a filtered list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Display corresponding "name" value to a filtered list

Last post 04-13-2010 03:13 AM by GrahamP. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 03-23-2010 04:03 PM

    Display corresponding "name" value to a filtered list

    Hello

    I have a dropdown list box which returns an ID number from a sharepoint list using the filterowssvr command. I need to display the "name" value from the list which corresponds to the ID number. I am using a read only text box control to display the "name".

    How do I set up the text box data connection to return the required value using qRules. Many thanks

    Filed under:
  • 03-25-2010 03:29 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hi, Graham:

    I don't quite understand what you are trying to do. I take it the name is returned in the secondary data source bound to the field with the dropdown? Can you just add a rule to the field bound to the drop down to set the field bound to the text box to the correct value from the secondary data source?

    That is, if your drop down is bound to fieldA, and your text box is bound to fieldB, and your secondary data source is called "List", you'd add a rule to fieldA to set fieldB to the value of the "name" field in "List" where the ID for the name is equal to the value of fieldA.... Make sense?

    Hilary Stoupa

  • 03-25-2010 04:32 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hi Hilary

    Thanks for the reply. Makes sense and all is well. However I have another question:

    I'm using the filterowssvr command to retrieve a name field which is a lookup column in my sharepoint list. The value is returned with a preceding #<number><name>. I know I can edit the xsn manually to remove the unwanted #<number> so that just the name is displayed but is there an easier way to do this using qRules. Thanks

  • 03-25-2010 05:41 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Is it returned in that order? Like #24Hilary? On one of my ShP sites, with a look up, I got back number#name, so 24#Hilary. In that case, it is pretty easy to use substring-after to get what you want.

    Hilary Stoupa

  • 03-25-2010 06:55 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hilary, I'm returning <number,#name> where the number varies, ie 3,#john smith, or 33,#john........

    You make it sound so simple but I'm afraid I'm a learner at this and need a little guidance. Can you please expand on what the function would look like if my field name is "responsible" bound to a read only text box. Thanks  

     

  • 03-26-2010 08:43 AM In reply to

    Re: Display corresponding "name" value to a filtered list

    I'd add a rule to the field 'responsible'. The rule would have a condition -- If 'responsible' contains '#'. The action for the rule would be to set a field's value. The field would be 'responsible'. Click the fx button next to the area for the value, and enter a formula like this: substring-after(responsible, '#')

    Use the 'Insert Field or Group' to pick the 'responsible' field where the formula above has it typed out. I hope that helps!

    Hilary Stoupa

  • 03-28-2010 10:23 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Many thanks Hilary, works great.

    Just one more question and I should be right. When using qRules to filter sharepoint lists, is it possible to filter a choice field to return 2 of the available 3 options.

    If the choices are, "Not Actioned", "In Progress" and "Complete", I need to return everything except the Complete items to a drop down list on my form. The user will update the status on the form and resubmit (update) the list. Thanks   

  • 03-29-2010 11:52 AM In reply to

    Re: Display corresponding "name" value to a filtered list

    I did a little research on this, to see if there was a way to use a 'not equals' or an 'or' type statement with owssvr.dll. I didn't find one, but I did find a suggestion that is working for me when I test. Create a calulated column that will return one value if the row is one you want to use, another value if it isn't. In my test, I created a column named 'Available', and used this formula: =IF(Status="Complete","0","1")

    Then I set my filter field to use the Available column, looking for a value of 1. I didn't show my column in my list, so hopefully it won't confuse your users....

    Hilary Stoupa

  • 04-06-2010 06:33 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hi Hilary

    Again your advice worked a treat. Thankyou. Another question although I'm not sure this is the correct forum?

    I have 20 or so qRules injected forms requiring central admin rights to publish. I do not have this level of permission on our intranet. My intent was to create a master library of administrator approved templates which would allow me to select each form, change the data connections and re publish to a new SharePoint site without having to go through central admin each time. Do you know if this is possible. Thanks. 

  • 04-07-2010 04:08 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hmmm. I'm not quite sure what you mean. What all data connections need to change? Just the submit?

    Hilary Stoupa

  • 04-08-2010 03:15 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hilary

    A bit more explanation. Our business is construction and each new project uses a stand alone SharePoint website developed from a standard template. The forms are interactive and are required to be progressively completed as the project progresses. Construction periods can be anything from 1 to 5 years.

    With each new project the forms are required to be published to the new website for progress monitoring and reporting, hence the data connections need to be modified to connect the forms to the lists and libraries contained within that projects website. 

    If we have a master library of approved forms at the top level in SharePoint, I need to be able to retrieve each form from this library, amend the list GUID's and SUBMIT connections and link the form to the new projects lists and libraries. Can this be done using an administrator approved form template that would allow me as a non administrator to amend and publish to new sites. 

    I hope this makes sense and thanks for your patience.   

  • 04-12-2010 08:31 AM In reply to

    Re: Display corresponding "name" value to a filtered list

    These forms are opened in the client, or in the browser? If they are opened in the client, I don't believe they would need to be admin approved.

    Hilary Stoupa

  • 04-12-2010 02:09 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    Hi Hilary

    All forms are web based and opened in a browser 

  • 04-12-2010 03:08 PM In reply to

    Re: Display corresponding "name" value to a filtered list

    So the different libraries would be set up to open forms in the browser, and to use the published, admin approved content type? You'll use ChangeSubmitUrl to get the Url the form should submit to from the library it is opened from? Then all you'd need to do is find a way to update the List Id for the list you've mapped your SubmitToSharePoint list command to, is that correct?

    I'm sorry that I'm struggling to understand exactly what you are trying to do. If I've outlined it correctly above, you may want to consider having a SharePoint list that has two columns -- one for the List GUID for SubmitToSharePointList, and the other the URL of the form library the form will be submitting to. Prior to having your template admin approved, you could add another data connection to that SharePoint list, then do something like:

    1. Run the ChangeSubmitUrl command both to set the submit Url and to get the submit Url from the qRules Result node
    2. Use that submit Url to get the correct List GUID for your SubmitToSharePointList command from the data connection to the new SharePoint list
    3. Set the List Id field in the mapping.xml to the new GUID

    A possible issue with this approach would be if your SharePoint lists you are using the SubmitToSharePointList command with do not have the same column names as your original mapping.

    To my knowledge, if you make any changes to an admin approved template, it has to be republished and admin approved again. That's why I was trying to think of a way for you to do this without template changes.

    Hilary Stoupa

  • 04-13-2010 03:13 AM In reply to

    Re: Display corresponding "name" value to a filtered list

    Wow, that's a lot to absorb as well as doing my day job. So the trick is not to re-publish the form to the new project website but to simply save it! Mapping should not be a problem as columns are the same for every project. I haven't had time to try this out yet so I may have a follow up for you but it looks promising. Many thanks for your help.

    I'll let you know how I get on.    

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