cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWhat%20is%20the%20difference%20between%20%26lt%3B%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi.%20%26nbsp%3BI'm%20curious%20if%20any%20can%20tell%20me%20what%20is%20the%26nbsp%3Bdifference%20between%20the%20%26lt%3B%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%20commands%3D%22%22%3E%3C%2FNEXT%3E%3CLINGO-LABS%20id%3D%22lingo-labs-800043%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAutomation%20and%20Scripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FSIB%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FLINGO-SUB%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800084%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERe%3A%20What%20is%20the%20difference%20between%20%26lt%3B%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800084%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EThere%20are%20cases%20where%20it's%20the%20same.%20But%20for%20the%20last%20child%20of%20a%20parent%2C%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1726695095590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1726695095590.png%22%20style%3D%22width%3A%20252px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68442i6F4B864E81D53176%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1726695095590.png%22%20alt%3D%22hogi_0-1726695095590.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26lt%3B%26lt%3B%20sib%20will%20return%20empty()%20and%20%26lt%3B%26lt%3B%20next%20will%20walk%20to%20the%20next%20level%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20the%20same%3A%0ANew%20window(%22v1%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v1%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(1)%5D%20%20%26lt%3B%26lt%3B%20next())%20%26lt%3B%26lt%3B%20select%3B%0A%0ANew%20window(%22v2%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v2%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(1)%5D%20%26lt%3B%26lt%3B%20sib())%20%26lt%3B%26lt%3B%20select%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20%26lt%3B%26lt%3B%20next%20walks%20to%20the%20next%20level%20and%20returns%20tb3%0ANew%20window(%22v3%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v3%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(2)%5D%20%20%26lt%3B%26lt%3B%20next())%20%26lt%3B%26lt%3B%20select%3B%0A%0A%2F%2F%20%26lt%3B%26lt%3B%20sib%20returns%20Empty%20-%20and%20select%20will%20fail%0ANew%20window(%22v4%22%2C%20mainLB%20%3D%20HList%20box(x%20%3D%20V%20list%20box(%20tb1%20%3D%20Text%20Box(%22v4%22)%2C%20tb2%3DText%20Box(%222%22)%20)%2C%20tb3%3Dtext%20box%20(%22%20%203%22)))%3B%0Await(0)%3B%0A(current%20report()%5BTextBox(2)%5D%20%26lt%3B%26lt%3B%20sib())%20%26lt%3B%26lt%3B%20select%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20What%20is%20the%20difference%20between%20%26lt%3B%3CSIB%20and%3D%22%22%3E%26lt%3B%3CNEXT%3E%3CLINGO-BODY%20id%3D%22lingo-body-800085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26800%22%20target%3D%22_blank%22%3E%40hogi%3C%2FA%3E%26nbsp%3B.%20%26nbsp%3BMakes%20sense.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FLINGO-SUB%3E%3C%2FNEXT%3E%3C%2FSIB%3E%3C%2FLINGO-SUB%3E
Choose Language Hide Translation Bar
nikles
Level VI

What is the difference between <

Hi.  I'm curious if any can tell me what is the difference between the <<Sib and <<Next commands?  I'm designing a gui and I've noticed both commands will return the display box that immediately follows the current db.  Do they do anything differently, or can they be used interchangeably?

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XIII

Re: What is the difference between <

There are cases where it's the same. But for the last child of a parent,

hogi_0-1726695095590.png

<< sib will return empty() and << next will walk to the next level:

// the same:
New window("v1", mainLB = HList box(x = V list box( tb1 = Text Box("v1"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)]  << next()) << select;

New window("v2", mainLB = HList box(x = V list box( tb1 = Text Box("v2"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)] << sib()) << select;

 

// << next walks to the next level and returns tb3
New window("v3", mainLB = HList box(x = V list box( tb1 = Text Box("v3"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)]  << next()) << select;

// << sib returns Empty - and select will fail
New window("v4", mainLB = HList box(x = V list box( tb1 = Text Box("v4"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)] << sib()) << select;

 

View solution in original post

2 REPLIES 2
hogi
Level XIII

Re: What is the difference between <

There are cases where it's the same. But for the last child of a parent,

hogi_0-1726695095590.png

<< sib will return empty() and << next will walk to the next level:

// the same:
New window("v1", mainLB = HList box(x = V list box( tb1 = Text Box("v1"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)]  << next()) << select;

New window("v2", mainLB = HList box(x = V list box( tb1 = Text Box("v2"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(1)] << sib()) << select;

 

// << next walks to the next level and returns tb3
New window("v3", mainLB = HList box(x = V list box( tb1 = Text Box("v3"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)]  << next()) << select;

// << sib returns Empty - and select will fail
New window("v4", mainLB = HList box(x = V list box( tb1 = Text Box("v4"), tb2=Text Box("2") ), tb3=text box ("  3")));
wait(0);
(current report()[TextBox(2)] << sib()) << select;

 

nikles
Level VI

Re: What is the difference between <

Thanks @hogi .  Makes sense.

Recommended Articles