Sharepoint 2013 Column validation not working - validation

I have a few columns in a list and one is called Supervised, the other relevant one is called Co-Supervisor.
I'm trying to force Co-Supervisor not to be blank if Supervised="Yes" but cannot get the column validation to work!
I've tried several different formulas in the Co-Supervisor column validation settings. I always get an error. Please help!
This is an example of one of the formulas I've used:
=IF([Supervised]="Yes",TRUE,FALSE)
I've also tried:
=AND([Supervised]="Yes",(NOT(ISBLANK([Co-Supervisor])))
What am I doing wrong?

Please use below formula:
GoTo List settings
GoTO validation settings
Use below mentioned formula
=IF([Supervised],IF([Co-Superviser]<>"",TRUE,FALSE),TRUE)
I have tested this on my environment and it is working fine.
(Note : Yes/No fields are internally stored as bit/boolean.So IF[Supervised] will directly evaluate to True/False.
Reference - https://sharepoint.stackexchange.com/questions/89188/calculated-column-issue-with-if-statement-and-yes-no-field
)

Related

OBIEE Passing Parameter to Analysis With URL

I have this Analysis that I wish to invoke from URL (which I can).
This analysis in particular is mounted on a dashboard and 6 of the 17 columns can be filtered from a prompt mounted on the same dashboard.
I only need the analysis and still be able to filter the results. I read about parameters that can be given to the URL, but I can't seem to make the filters work. I am using the &P0=n parameter and the consequent &P1=xx parameter.
Without the &P I am able to see the table, when I add parameters I get this error UH6MBRBC:E6MUPJPH.
Thanks for your time, have a nice day.
Got it to work by myself afterall (always best).
Basically instead of &p0 and such I used &coln and &valn (where n is the column number):
&coln - is the name of the field
&valn - is the value for which you filter
More information and better explanation can be found here.

X-Path Query won't work in Google-Sheets

I've been trying to use the following X-Path within Google-Sheets with the =ImportXML function
=importXml("http://www.managetickets.com/morecApp/ticketSearchAndStatusTicketList.jsp?msgCount=23&outputEmail=&db=nd", "/table[2]/tbody/tr#[td]")
But no matter what minor adjustments I try I continually get "#N/A" with a hover-text box that says "imported content is empty".
I know it's a valid x-path, I've cross verified it with 'X-Path Helper Wizard' chrome-extension.
Any ideas what I'm doing wrong!?
No, actually it's not a valid XPath. Note that # used to select an attributes e.g. #class, #id, etc. Also it's a bad idea to use tbody tag in your expressions as this tag is not always present in initial source code
So if you want to match table rows which contain cells from second table, you can use
/table[2]//tr[td]

Getting multiple Configuration Values into a Command Line script

Using TeamCity 9.1.4.
I'm trying to get some server hostnames into a Command Line script with Configuration Parameters. I want each option to contain multiple hostnames.
My configuration:
vanmain => rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer
tor => rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr
fvcdc => rad-fvcdc,rad-balancer
bccfa => rad-bccfa
When I select fvcdc in a build, I receive the following error message:
One of entered values 'rad-fvcdc' is not one of valid select item values: rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer,rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr,rad-fvcdc,rad-balancer,rad-bccfa
How do I get the values into my script?
Dunkan,
I successfully reproduced your issue and was able to find out the root cause of it.
On my virtual installation I created a build with select type parameter, let's name it HostValue. Next, in Items field I copy/pasted values from your initial post and tried to reproduce the problem -- but executing the build was successful. Then I decided to reconfigure parameter and toggled Allow multiple checkbox, and viola, same error message as you got!
If you read small text below Value separator field, you will see, that default value is comma: , and as your values contain this symbol you got an error.
So, to solve this problem I can suggest you these variants:
If you don't need multiple choices, you can just turn off this feature and everything should work.
Replace default Value separator with custom one, for example <SEP>. Then whenever you will select multiple values for this parameter you will get something like:
"rad-ecr1,rad-ecr2,rad-ecr3,rad-myecr,rad-balancer"<SEP>"rad2-bal,rad2-ecr1,rad2-ecr2,rad2-myecr"<SEP>"rad-fvcdc,rad-balancer"
Replace comma in your values with some other separator, for example | or :. In this case it would look like:
"rad-ecr1:rad-ecr2:rad-ecr3:rad-myecr:rad-balancer","rad-fvcdc:rad-balancer"
After that you can use the value of this parameter as usual %HostValue% and parse depending on which variant you choose.
Maybe the error message from server could be a little bit clearer. Hope it will help you.
Also I would like to recommend you my plugin teamcity-web-parameters. It will allow you to create dynamic select values from external web service.
Take a look at this thread: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206843785-How-to-specify-empty-value-for-Typed-Parameter -- looks very similar to your question.

Use condition in powerpivot (DAX)

My problem is that I can't get the IF condition to work in powerpivot (using DAX).
According to manual the syntax is:
IF(logical_test>,, value_if_false) where I can omitt the "value if false" if i want.
I have a lot of columns and I try to make a new one based on condition from another column.
What I tried is =IF([TimeTypeCode]="400", [WorkingHours]) and that doesn't work. What I want my condition to do is that if [TimeType] is equal to 400, then i want to put the value from [WorkingHours] in my new column. How can i do this?
from what I see here the problem is the ="400", the "" you used tell dax thats a string type and you are trying to use it as a numeric value.
Try using
IF([TimeTypeCode]=400, [WorkingHours])
instead,
Cheers!

IsEmpty or IsNull or IsNothing?

Can someone help me determine which I should be using?
Here is the situation - I am pulling a value from a column in the Data Table. If there is anything in that column, I set the data to a variable and take an action. If the column is blank, I want to skip that.
I am confused as to which IsWHATEVER statement would be best. For Example:
If IsEmpty(Datatable.Value("M4","Data_Entry"))=False Then
OR
If IsNull(Datatable.Value("M4","Data_Entry"))=False Then
OR
If IsNothing(Datatable.Value("M4","Data_Entry"))=False Then
Suggestions?
I've just tried all of your options and found this to be the most correct:
If (DataTable.Value("M4","Global") <> "") Then
Your original options will not work on QTP Datatables as these are for uninitialised objects or variables. However, in QTP as soon as you create a parameter in the Datatable the first value gets initialised as blank (not to be confused with empty).
I agree with shreyansp.. The 3 options are for variables and objects
You could also use the below expression
If len(trim(DataTable.Value("M4","Global"))>0 Then
'Do code here
End If

Resources