Solved

Hiding hyerlinks in infopath

Posted on 2014-03-18
6
169 Views
Last Modified: 2015-01-09
I have a requirement in Sharepoint 2010 Infopath to hide the hyperlinks ( these are the links to navigate user to folder in sharepoint library) based on a condition.
I have a contract list and ContractsVendor Library. When item is created in Contracts List a folder is created in ContractsVendor Library by Contract Name. User will upload files in Folder.If the folder does not have any files in it , I have to hide the hyperlinks in edit ifs form/displayifs forms.

Please find attached screenshot for your reference.

Any help in this regard will be appreciated.
HideLinks.png
0
Comment
Question by:asrithap
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:clayfox
ID: 39938186
I would think you would need to have a data connection to each library or list and query each to see if there is anything returned.  Then based on that you could have a formatting rule which hid that repeating element.

You can use the "is not present" condition to check for the absence of a returned record
0
 

Author Comment

by:asrithap
ID: 39938695
Could you please elaborate on query data source is something is returned ?
0
 
LVL 6

Expert Comment

by:livanescu
ID: 39939314
in Sharepoint for ContractsVendor: create a view for the data you want returned in the order you would like to get the data)
---
in infopath designer:

to create a data connection
Data --> From SharePoint List and be sure you understand every detail as it goes along.
make sure to define when the data gets queried (on an event vs when the form gets opened)
You should find it in Data Connections

to expose the data,
create a section for each link you want to hide/show
use rules (Control Tools --> Manage Rules) and
hide the section (Formatting rules) based on your desired criteria
now this gets a bit more complicated on getting it right...
ex:
you get to define the condition
unfortunately you have to understand how it works and I'll give you a hint
on the left member, select anything that is unrestricted (strings, groups but avoid integers, booleans)
on the right member choose "Use a formula"
"Insert Function", select "All" on the left and select count on the right side
select "double click to insert field" on the first dropdown under Fields, select your newly created data connection and select the repeating group under dataFields; hit ok
note the Filter Data... option - we'll discuss it a bit later
so now your formula should say count(myVendorList)
click on Edit XPath and copy the formula and hit cancel
on the left member, select "The expression" and paste the copied formula from previous step
after this pasted formula, please  add = 0 to make up the second half of the expression
this means that count(myVendorList) = 0 is the condition; you would select Hide this control to finalize the rule.

if it depends on a field select (i.e vendor name) you can include that in filtering the data (remember Filter data... button?)

After a bit of exercise you will get fluent ;-) try small steps to understand the functionality
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:asrithap
ID: 39939491
Thank for the reply.Its little confusing as I am new to Sharepoint. Is it possible for you to put screenshots of this functionality that you have explained. Sorry to bother you , I have hope that you will guide me in solving this issue.Its bit kind of urgent.
0
 
LVL 6

Accepted Solution

by:
livanescu earned 500 total points
ID: 39940660
I will, but give me a few days to get my old sharepoint online to create something
Liviu
0
 

Author Comment

by:asrithap
ID: 39940672
Sure will wait for your implemenation using screenshots. Appreciate your help in this regard.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now