How to use formula CASE WHEN on Netsuite Oracle? - oracle

Hi Can someone help me with the Saved Search: So I’m trying to create a formula(numeric) that would say:
CASE WHEN {internalid} = ‘32319’ THEN 1 ELSE 0 END
— didn’t work it didn’t even show on the description
I also tried:
CASE {internalid} WHEN 32319 THEN 1 ELSE 0 END — also didn’t work and didn’t show on the description.
Not sure if perhaps using formula on my saved search is disabled on my end if so how can I know or check? Or maybe I did not use to correct syntax for the CASE WHEN? The formula is also grayed out(highlighted).

I managed to find a solution. As it turns out I just needed to put a value of 1 on the textbox for Value to validate the CASE WHEN Statement. Also whether there's a single quote for the numbers or in this case without a single quote, it still worked.

Either of those forms should work but your screen shots show a Formula(Text) rather than Formula(Numeric)

Related

Whenever specific button clicked it does something in Pascal

Hello.
Can anyone help me with scanning buttons always and when I click specific one it does something even Im writing? I want to be filling a record with like 9 attributes but when Im atc. at fourth I want to close it. I tried some readkey stuff :
procedure searching();
var p:char;search:string='';
begin
repeat
p:=readkey();
write(p);
search+=chr(p);
until (p=#27) or (p=#13);
if (p=#27) then menu()
else
...
but the problem was that it written some character it was not possible to erase it and I knew that backspacing and writing again made my search filled with characters I did not wanted in there. Couldn't find a topic about it in pascal so im trying here. Don't flame for english please. Hope you get what I meant, also English is maybe the problem I can't find it, whatever. Waiting for answer, Thanks, Maroš.
but the problem was that it written some character it was not possible to erase it
Why not? Just handle #8 (backspace) and truncate your last character from the search string. You can use both System.Delete (by deleting the last character) and System.SetLength (by setting the length to current length - 1).

VBScript Nothing returns garbage

We have to use VBScript as an embedded script engine in our Hospital Information System.
When we use nothing to set the value of a control (textbox/checkbox/...) it worked always fine. Since somepoint it sets now the textbox to "?>".
item("TEXTBOX").value = nothing ' Leads to -> "?>"
It is not completly clear what causes this, maybe a windows update is responsible, every rollup ~ since KB3212646 Win7 2017-01 seems to cause this error.
My Question is now, has someone else also seem this error, so that it is clear that MS causes this error or is our HIS publisher responsible for not handling nothing correct.
I know setting a textbox to Nothing is not best practice instead "" should be better, but since the item object could be more the just a textbox e.g. a combobox/checkbox this seems, from an objectoriented perpsective, better. Or am I completly wrong?
Following #Ansgar comment, you should apparently change everywhere you have = nothing to = "" in your example
item("TEXTBOX").value = ""
Beware to keep the nothing if you have the Set keyword in left
Set some_object = Nothing

Multiple Conditions In Excel

I entered the below formula into excel. When I copy the formula down for the rest of my sheet, it gives the "eligible" value to all fields even when the J field has no data to pull from. What am I missing?
=IF(J3<=40,"Eligible",IF(AND(J3<=30, J3>=39.99), "Particially","No"))
Blank is interpreted as zero, so J<=40 will be true. You probably need to put an IsNumber check in there too.
=IF(AND(J3<=40,ISNUMBER(J3)),"Eligible",....
EDIT: based on your comment, you can simplify this by reversing the logic, and you don't need an and clause.
=IF(J1<30,"no",IF(J1<40,"partial","eligible"))
I think logic is wrong.
Try this (included remark by John Barça):
=IF(ISNUMBER(J3),IF(J3<30,"Eligible",IF(AND(3<=39.99,J3=30),"Partially","no")),"Not a number")
Or please describe what you want to get.

How do I use Watir::Waiter::wait_until to force Firefox to wait?

I have some buttons that get disabled when adding a user.
What I need to be able to do is have firewatir wait_until something is present.
I am trying to use this right now:
count = 10
while count > 0
browser.button(:name, "_eventId_addEmployee").click
Watir::Wait.wait_until_present {text.exist? newHireUsername}
end
count -= 1
end
For some reason I can't get the wait_until method to work correctly.
Thanks in advance!
I usually do something like this,
browser.element_type(:id, "xxx").wait_until_present
Instead of using the wait_until_present option I used an until loop to wait for text to appear.
This by-passed attempting to use it so it does not qualify as an answer for my original question but want it here for others.

Descendent-or-self in InfoPath

I want to use XPath code in an InfoPath form to sum the data in field12 when field11 is equal to IT. I tried using the following code, but it doesn't work.
number(sum(/descendant-or-self::node()/my:group12[my:field11 = "IT;"]/my:field12))
I suspect this has to do with the multilayering of groups, as shown below. Does anyone know the code that would allow me to get to the data in group12? Thanks in advance for your help.
myfields>group9>group10>group11>group12>field11 field12
Genipro
Looks like:
number(sum(/descendant-or-self::my:group12[my:field11 = 'IT;']/my:field12))
could be right.
decendant-or-self should not be necissary in this case (unless you need the expression to work even if group12 is moved).
This should work fine:
sum(/my:myfields/my:group9/my:group10/my:group11/my:group12[contains(my:field11,'IT')]/my:field12)
It doesn't matter if any of the other groups are repeating either. All group12's will be checked.

Resources