Solved

Hiding hyerlinks in infopath

Posted on 2014-03-18
6
162 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

12 Experts available now in Live!

Get 1:1 Help Now