cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

add modulo to the NewFormulaColumn menu

☐ cool new feature
☑ could help many users!

☐ removes a „bug“

☐ nice to have

☐ nobody needs it

 

 

In the NewFormulaColumn/Transform menu there are many useful functions, but "modulo" is missing:

 

HolgerSp_0-1663679673010.png

 

more wishes submitted by  hogi_2-1702196401638.png

19 Comments
Status changed to: Acknowledged

@hogi - Thank you for this suggestion!  We have captured your request and will take it under consideration.

mia_stephens
Staff
Status changed to: Not Planned For Now

Thank you for this suggestion. We are not currently planning on making this change, but will consider this in a future release.

hogi
Level XII

Hm, could you please re-consider this wish.

For my case, every second day I have to generate a column formula with modulo.

Are there other Jmp users who could benefit`?

 

Main application case:
semiconductor industry - determine the sub-position on a wafer (e.g. position inside a lithography "shot")

 

Other application cases:

  • to auto-generate a table with x & y coordinates:
    start with row number.
    x= floor (row/N)
    y= modulo(row/N)
  • check if a number is even or odd
mia_stephens
Staff

Thank you for this additional information @hogi. We have not received other requests for modulo to be added to New Formula Column, and I'm sure you appreciate that the menus of functions can get quite long so additions are carefully evaluated.

 

If this is something you do regularly, have you considered a scripted solution? 

jthi
Super User

If menus of functions get too long how about adding preferences so users can limit what is being shown?

 

I think scripted solutions could work (sometimes) if you could easily add them all menus (New Formula and so on). And then there is this issue: Creating statistical custom (formula) function which has byVar ,

Option or function to evaluate a custom column formula at once, or cache values between rows .

 

And the more generic issues with scripting everything where you have to keep them updated over different JMP versions which quite commonly break things and validating them (instead of trusting that JMP has done the validation).

hogi
Level XII

To be honest, I am also a bit surprised that no Jmp user opted for this wish *)

Definitely, there will be many users who will use the new feature

 

I agree with @jthi : If there was a possibility to add user-defined functions to the new formula columns menu, everything would be easier/more flexible.
The wish is there, but also without Kudos - which apparently doesn't mean that nobody wants it. It's just because nobody found the wish
https://community.jmp.com/t5/JMP-Wish-List/personal-presets-for-quot-new-formula-column-quot-right-c... 

Let's hope that the wish gets into a future release - even without Kudos ...


Nevertheless, every basic arithmetic operator should already be in the list by default - if necessary: in a submenu. The majority is there **).
Division is not directly available - but indirectly via Scale Offset/Multiplier. So, no issue.
But  modulo is completely missing.
Concerning importance:

For C++ the modulo operator was important enough to reserve a character for it. ***)
So, it's definitely not one of those strange functions which you hear and forget - and never use.

 

*) Could be that the current approach to hide new wishes in the wish list menu is not a good idea.

 

**) Some while ago I feared that Jmp also kept the multiplication from the right click new formula column menu - but in this case it was just difficult to find it

https://community.jmp.com/t5/JMP-Wish-List/add-quot-rescale-quot-to-new-formula-column-right-click-m...

 

***)

Single character arithmetic operators in C++:

hogi_1-1674904965541.png

ih
Super User (Alumni)
Super User (Alumni)

@hogi you can define custom functions that are available in the right-click New Formula Column menu:

 

Add Custom Functions(
	New Custom Function(
		"Modulo",
		"y=5",
		Function( {x}, Modulo(x, 5) ),
		<<Transform Category( 1 )
	)
);
Add Custom Functions(
	New Custom Function(
		"Modulo",
		"y=10",
		Function( {x}, Modulo(x, 10) ),
		<<Transform Category( 1 )
	)
);

This adds:

ih_0-1674958246602.png

 

 

 

hogi
Level XII

Hi @ih - I didn't know that custom functions are automatically added to the right click context menu. That's convenient.

This could help a bit.

 

But what I have in mind here is a universal "modulo" function (like the "Scale Offset" - just for modulo).

If the user clicks on "modulo", a window shows up and the user can enter the number as a second argument for modulo.

Then a formula column should be generated with modulo(columnname, number from the GUI).

 

It it possible to add such a GIU-Function to the New Formula Column Right click menu?

ih
Super User (Alumni)
Super User (Alumni)

No I do not know of a way to add a dialog box to the custom transformation formula interface.  It might be possible though, that might be a good discussion post.

 

Note the Transform Category message which make the custom function available in the right-click menu.

hogi
Level XII

Hi @mia_stephens :
Following @ih 's solution, I asked the community for a way how to add the desired Modulo miniGui to the New Fomula Column right click menu.

Unfortunately, without success: https://community.jmp.com/t5/Discussions/How-to-add-user-defined-mini-Guis-to-the-right-click-new-fo... 

 

Do you have a specific way in mind how this can be done?