• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Hiding hyerlinks in infopath

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
asrithap
Asked:
asrithap
  • 3
  • 2
1 Solution
 
Clay FoxDirector of Business IntegrationCommented:
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
 
asrithapAuthor Commented:
Could you please elaborate on query data source is something is returned ?
0
 
livanescuCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
asrithapAuthor Commented:
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
 
livanescuCommented:
I will, but give me a few days to get my old sharepoint online to create something
Liviu
0
 
asrithapAuthor Commented:
Sure will wait for your implemenation using screenshots. Appreciate your help in this regard.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now