Questions tagged [iif-function]

IIf is a language function to perform an immediate or inline conditional assignment.

IIf is an abbreviation variously for Inline If or Immediate If and is available in many programming and script languages, IIf is implemented as a Function which means it returns a value. In code, these typically take the form:

result = IIf(condition, TruePart, FalsePart)

The value of result afterwards depends on the evaluation of condition.

A multi-line If block could perform the same action but would be an If Statement. The statement form could include any number of other actions such as invoke other methods. On the other hand, IIf simply results in a conditional assignment and cannot invoke other code.

Some languages also support a 'conditional operator', sometimes called a ternary operator, which works similar to IIf, but may offer other benefits.

94 questions
0
votes
2 answers

Can you assist with wrong informatica results?

Hello I am new to informatica, and was trying to write a decode or if, where only one value goes into the output port... a value that is not equal is going into the output port... i iam positive the value is not equal... so my decode doesn't work…
Frederica
  • 35
  • 5
0
votes
2 answers

IIf clause in Access doesn't work correctly

I'm trying to create a table for invoice in Access and this is my table schema: id AutoNumber customer_name Number product_name Number count Number unit Calculated date Number The customer name and product name are lookup wizard that select their…
Alora
  • 761
  • 1
  • 5
  • 12
0
votes
3 answers

JavaScript IIFE Evaluation is undefined

Hello I‘m a beginner at JavaScript and I‘m trying to figure out how IIFE work, and I still have some trouble. In the lecture I stumbled upon this example code, and the evaluation of the code below gives the result „undefined“ whereas calling the…
Msmat
  • 27
  • 4
0
votes
1 answer

How to write an SSRS expression where one field is dependent upon the value of another field

I am trying to write an expression using two separate fields: Fields!StmnPrice.Value and Fields!StmnUnits.Value. The expression is in a text box under a column labeled "Billed Units." I want Billed Units to display the sum of only the statement…
0
votes
0 answers

How to convert Excel IF function into google sheets

I converted an excel document into a google sheet but the formulas didn't tranfer correctly. Specifically the IF functions. Does anyone know how to fix this? This was the original IF function in…
0
votes
2 answers

IIf query decimal removal

Trying to attempt the following in MS Access. Convert data in one field to an 18 digit number starting with 01 in another field. There are also some conditions that have to be met: the first dash should become double zeros the second dash should…
0
votes
1 answer

Report Builder 3.0 SWITCH and nested IIF both throw the same error [BC32017]

I'm using report builder 3.0 trying to get a dynamic title based on a user chosen parameter. Error The Value expression for the textrun ‘Textbox29.Paragraphs[2].TextRuns[0]’ contains an error: [BC32017] Comma, ')', or a valid expression…
tomdemaine
  • 738
  • 6
  • 22
0
votes
2 answers

Excel - Finding Data in one Column and showing the values in the corresponding column

I'm having a lot of trouble trying to come up with the right formula for this... I hope it'll be clear! I have 2 sheets in my Excel. The first has Active IDs (~500 rows). The Second has All IDs, active & inactive with a dollar value associated to…
Sheila
  • 37
  • 5
0
votes
2 answers

SSRS nested IIF/CStr explanation

Could someone let me know if the IIF statement below means output any value that starts with a 4 please? =IIF(LEFT(CStr(Fields!CLOCK_NUMBER.Value),1)="4",Fields!JOB_NO.Value, "")
0
votes
2 answers

MS Access Update Query with an IIF and DATEADD functions

I have 6 fields in my "table1". Current Date Next Adjustment Date Months Elapsed Index 0 Index 1 Index 2. I'm trying to create an update query for Index 1 where if the (Current Date+Months Elapsed) < Next Adjustment Date then Index 1 is Index 0…
Ian
  • 11
  • 1
  • 6
0
votes
1 answer

Iff statement in Access report with possible more than 1 true condition

I want to make a report that could return several conditions. Negative, Positive, Cancelled, Negative/Dilute, or Positive/Dilute. I wrote a IIF statement with several conditions. =IIf([Negative]="1","NEGATIVE RESULT", …
Tazit
  • 3
  • 3
0
votes
0 answers

Creating Counter that adjusts based on category

SELECT Table1.DateBEG, Table1.DateEND, Table2.[HIRE DATE], Table2.Action, Table2.EffectiveDate, IIf([Table2].[HIRE DATE]<=[table1].[action] And [Table2].[Field4]<>"LOA",1,0) AS expr1 FROM Table1, Table2; I have two Tables as you can see in the…
Serg
  • 23
  • 3
0
votes
1 answer

ACCESS iif Statement for Multiple conditoins

I'm trying to add multiple iif statements to one field in a query. It is not working if I try to put it all together. I don't know how to do this and make it work. I've tried several different ways. This is what I have: IIf(([M1]='A') OR…
Kim
  • 1
  • 1
0
votes
1 answer

IIF function- return specific values based on the month

I'm trying to write a query that will populate the "Quarter" field with either Q1, Q2, Q3, Q4 depending on which month a certain transaction occurred in. I'm attempting it this way, which I think is rather clunky: IIf([Original Date] like “7*” Or…
Katie
  • 105
  • 2
  • 12
0
votes
1 answer

CASE statement to IIF statement

I have this CASE statement that I need to convert to IIF in Access: Case When sfrstcr_pidm is not null Then 'A' WHen sfrstcr_pidm <> '' Then 'A' Else Null End as StudentStatus, Would this be the correct way to convert to IIF? IIF ([sfrstcr_pidm] is…
Katie
  • 105
  • 2
  • 12