Andreas Pfeiffer
Forum Replies Created
-
Andreas Pfeiffer
AdministratorApril 24, 2026 at 2:28 pm in reply to: SQL Worker and redraw. a subformHi Per-Arne,
Since the worker do their job on the server side, the $completed method of the worker would need to send a push to the client for synchronising the data. See also: https://www.omnis.net/developers/resources/onlinedocs/WebDev/02jsremoteforms.html#push-connections
Hope this makes sense.
Best,
Andreas
-
This reply was modified 1 week, 5 days ago by
Andreas Pfeiffer.
-
This reply was modified 1 week, 5 days ago by
-
Hi Uwe,
I would not recommend this.
It’ll be easier if you put the code from the $event method of the field into another method and then call this method from the button and the other place.
For example, you could add a method to your button, i.e. $updateData which has the code that you want to perform. Because the new method is now at the same button you can call this method from the $event method of the button like this: Do $cfield.$updateData()
And similar you can call the $updateData method from anywhere else in the form like this: Do $cinst.$objs.myButton.$updateData()
.. pretending the buttons name is “myButton”.
Does that help?
Best,
Andreas
-
Andreas Pfeiffer
AdministratorApril 23, 2026 at 1:23 pm in reply to: Re-ordering elements in the code editorHi Uwe,
You can re-arrange the methods using drag&drop.
However I think you are talking about the fields listed in the method editor. They order is given by the $order property of the fields which also controls the tab order.
I hope this helps.
Best,
Andreas
-
This reply was modified 1 week, 6 days ago by
Andreas Pfeiffer.
-
This reply was modified 1 week, 6 days ago by
-
Andreas Pfeiffer
AdministratorMarch 10, 2026 at 3:50 pm in reply to: Sort all lists based on a column of one listHi Massimo,
What do you mean with “based on the 2nd column of ivList1”?
Do you mean a value from ivList1 and if so, in which line? Is there any current line set?
Best,
Andreas
-
Hi John,
I hope you recovered well.
There is a documentation available on the databridge download page that should give you some more information.
Make sure that all clients use the databridge. It is important that no client accesses the database directly.
I hope this gets you going.
Best regards,
Andreas
-
Hi Uwe,
The simplest way is just to assume that you have a certain amount of columns max. Even if you have more it is likely not necessary to include the very last columns. But even if you add unnecessary columns to your sort command it would not hurt. For example:
Do iDataList.$sort($ref.c1,kFalse,$ref.c2,kFalse,$ref.c3,kFalse,$ref.c4,kFalse,$ref.c5)
will work – even if your list has only two columns.
However, if you want to have it precise, you can always create a string that can then be performed in square brackets. For example:
#get a string suitable for the $sort function
Do iDataList.$cols.$sendall(lString.$assign(con(lString,'$ref.',$sendallref.$name,',kFalse,')))
#get rid of the last comma
Calculate lString as trim(lString,kFalse,kTrue,',')
#now create the entire command
Calculate lString as con(iDataList.$name,'.$sort(',lString,')')
#finally perform it
Do [lString]I will attach the Omnis Studio 11.2 test library.
Hope this helps.
Best, Andreas
-
This reply was modified 3 months ago by
Andreas Pfeiffer.
-
This reply was modified 3 months ago by
Andreas Pfeiffer.
-
This reply was modified 3 months ago by
-
Uwe,
On the other hand instead of using the real column names you could also do something like this. So if you know the list has two columns you could do this:
Do myList.$search($ref.c1,kFalse,$ref.c2,kFalse)
Best,
Andreas
-
Hi Uwe,
The $sort requires a reference to the list column, not just the name of the list column. Only if using a list that is defined from other variables it might work like this.
Do the normal syntax would be something like this:
Do myList.$sort($ref.myColumn,kFalse,$ref.anotherColumn,kFalse)
or
Do myList.$sort(myList.myColumn,kFalse,myList.anotherColumn,kFalse)
I personally prefer $ref.
This said you would be able to create your string including the “$ref.” part. But when executing you would need to make sure that the string is executed.
Not tested though but I guess something of this might work:
Do myList.$search([mySearchArgument])
or maybe
Do myList.$search(eval(mySearchArgument))
Hope this helps.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorJanuary 26, 2026 at 8:06 am in reply to: How to get a Datagrid’s Displayorder?Hi Uwe,
this works after the client has changed the display order. Switch on $::candragdisplayorder and then before using the test button, drag any of the columns so that you get a different display order. Then your test button will display the new display order.
I think the $::displayorder was meant to either assign a different display order or to read it after it has been changed.
The initial display order is determined by the order of the columns within the list that is assigned to the grid.
I hope that makes sense.
Best,
Andreas
-
Andreas Pfeiffer
AdministratorApril 27, 2026 at 1:49 pm in reply to: SQL Worker and redraw. a subform -
Hi Uwe,
if it is not a remote form but a window you can use Queue commands to generate events. But I cannot recommend this as it will give trouble later on when the code becomes more complicated. Imagine you would need to debug this.
For a remote form the only and possible a recommendation would be using the $okkeyobject and $cancelkeyobject property of the form. Those will trigger the evClick of a button when the user hits the enter or escape key. That said you can also dynamically assign those properties to allow different behaviour when the user hits the enter key for example.
You might also be interested in $keyboardshortcut client-side method. Check out the Whatsnew in Omnis Studio 11.2 of the last years ODC conference.
BTW. Are we going to meet at the ODC this year?
Best regards,
Andreas
-
Andreas Pfeiffer
AdministratorApril 24, 2026 at 12:39 pm in reply to: Re-ordering elements in the code editorHi Uwe,
This is a know bug in an older Omnis version.
You can use a little code to get rid of any component that has no id. Something like this should work:
Set reference lObjRef to pClassRef.$objs.$first()
While lObjRef
If lObjRef.$ident=0
Do pClassRef.$objs.$remove(lObjRef)
Set reference lObjRef to pClassRef.$objs.$first()
Else
Set reference lObjRef to pClassRef.$objs.$next(lObjRef)
End If
End While
Save class [pClassRef.$lib().$name].[pClassRef.$name]
“pClassRef” is an item reference to the class in question (not the instance). “lObjRef” is a local item reference variable.
The code loops through any field and if $ident is zero it will delete this field. Probably you would need to also implement a recursive call as it can happen that fields are inside containers. Let me know if you need this too.
I hope this helps.
Best,
Andreas
-
This reply was modified 1 week, 5 days ago by
Andreas Pfeiffer.
-
This reply was modified 1 week, 5 days ago by
-
Andreas Pfeiffer
AdministratorMarch 11, 2026 at 8:33 am in reply to: Sort all lists based on a column of one listMassimo,
Do I understand this correctly that you want to sort all lists in that instance the same column in one go?
Assuming that all those lists are instance variables of the current instance you could do something like this:
Do $cinst.$ivars.$sendall($ref.$sort($sendallref.c2),$ref.$type=kList)
So basically you would send a message to all members of the $ivars group in the current instance that are of type list to do a sort on column 2 (c2).
Does that help?
Best regards,
Andreas
-
Hi Uwe,
I am glad that it works for you!
Thanks for the feedback.
Best,
Andreas
-
Hi Martin,
I am glad it helped!
Have a nice day 🙂
Best,
Andreas