Example for query as standard action of a button

Hi,

I tried to create a search using the standard ‘query’ action on a button. Unfortunately, I wasn’t successful. Either the result was an empty entity selection, or nothing happened at all. So far, I haven’t found any examples for this application. Can someone help me? I tried to use a datasource derived from a datastore class with a datasource of type string in the expression.

Regards Ronald

Hi Ronald, thank you for your feedback,

Can you give us a screenshot to have more details?

Best regards.

This is an example from Qodly Studio for 4D:

Bildschirmfoto 2024-04-30 um 16.42.13

Bildschirmfoto 2024-04-30 um 16.42.26

@Ronald try to set this as query string:

Name == :1

Then set the datasource suche as the first placeholder value:

Hope it helps.

2 Likes

Thank you! It works. How looks the query if I want to use the wildcard like suche+“@”?

@Ronald, you can create a function in the dataclass “Mitglied” and write this line:

return this.query(“Name = :1”, Suche+“@”)

“Suche” is the variable that you declare it as a parameter of the function.

1 Like