Using value of Editor Widget in a rule


#1

I am trying to create a custom Entity Screen which contains an Editor widget and an Automation Command Button widget.

I want the user to type in a number in to the editor widget (it will be a TicketID) and then press the Automation Command Button which will then load the specific ticket.

I have setup the Editor widget to store the value as a local setting, but I have noticed that this value is only stored if I press ENTER or tab away from the Editor Widget prior to clicking the automation button. If I jump straight from inputting the number to the Automcation Command (as I would expect users to do) then the value isn’t stored and therefore cannot be accessed the the rule associated with the Automation Command.

Am I missing something, is there a better way to pass through this editor widget value without forcing the user to first hit the enter key or to lose focus from the editor widget?


#2

No, that’s just the way it works, unfortunately. The Local Setting does not get registered until “Tab” or “Enter”. Certainly not ideal at all. Just something you need to live with.

For your purpose, you are better off removing the Editor Widget, but leave the AMC button there.
When the button is clicked, have the Rule fire an Action to Update (Local) Program Setting, but have the setting value come from using [?prompt] syntax.

The [?prompt] syntax has an input field and a Keyboard you can customize to contain only things like numbers, Ok, Cancel, etc. (by default it produces a full keyboard).

Something like the following give numbers, ok, cancel …

[?Enter Ticket Id;;;ONC]

#3

Yep, using PROMPT makes a lot of sense. I’ll do that.

I would have liked to use a Customer Report in #Table mode, but I noticed that in #Table more I lose the abiity to control column widths and to do any formatting, which I need.

Thanks


#4

Right-click on a header or another area on the #Table (not while in Design Mode), modify, Logout and shutdown SambaPOS.


#5

I did try that, thinking it would behaving like the tables in an Entity search widget, but it didn’t seem to. Perhaps I did it wrong, but either way I need the bold and heading rows to split up what would otherwise be a lot of data anyway.

The PROMPT method should work on the rare occasion the user needs to load an old ticket.


#6

Not sure it allows for that, but maybe try the Grid Editor or View Editor shown above. There is a LOT of stuff hiding in there!


#7

Funny you mention that… I was just trying to work out why the report wasn’t displaying to the full height of the widget and I found a MaxHeight value in the grid editor! :slight_smile:

Cheers @QMcKay


#8

Hmmmmm…

I can’t make this Grid Editor values to stick…

  1. Start SambaPOS
  2. Login
  3. Go to custom entity screen
  4. Right click > Grid editor
  5. Change value of MaxHeight (the change is instantly visible)
  6. Right click > Save changes
  7. Main Menu
  8. Logout
  9. Close SambaPOS

When I restart SambaPOS my changes have not been saved :frowning:

I get the same experience whether or not I use the “Save Changes” function.

Looking in the Layouts folder, it seems an XML is onl ever generated for “EntitySearch” widget and no other type of widget.

Have you managed to customize any of your #Table reports @QMcKay?


#9

LOL, no. Thought you might find a gem that I missed. It’s amazing how much stuff there is in there to tweak, but it all goes away after restart; probably even after Navigation away and back. :frowning:

I think maybe the Header Menu (widths, sorting, filtering, etc) might get saved (don’t remember), but the other Grid/View editors I have not been able to make stick.