We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

paturdc's profile - activity

2021-04-07 04:22:32 +0200 received badge  Famous Question (source)
2021-03-15 00:58:23 +0200 received badge  Notable Question (source)
2020-12-11 15:26:53 +0200 received badge  Supporter (source)
2020-11-14 23:08:39 +0200 commented answer How do I check for NULL and/or input errors in macros?

Sorry if I wasn't being totally clear. The answer you provided before is sufficient - the forms are limited to a subset

2020-11-14 22:15:07 +0200 commented answer How do I check for NULL and/or input errors in macros?

@ratslinger, when I read a value from a field using iValue = oForm.getByName("IDField").getCurrentValue() an empty

2020-11-14 09:33:31 +0200 commented answer How do I check for NULL and/or input errors in macros?

if RowCount > 0 and Row = 0, then there are rows returned but is on a new record line in the table grid. this wi

2020-11-14 09:24:33 +0200 received badge  Notable Question (source)
2020-11-14 00:17:19 +0200 received badge  Popular Question (source)
2020-11-13 23:57:54 +0200 commented answer How do I check for NULL and/or input errors in macros?

Thank you ratslinger, I'll try this tomorrow. Obviously if the rowcount = 0 I'll omit the rest of the macro sequence.

2020-11-13 23:45:05 +0200 commented answer How do I check for NULL and/or input errors in macros?

Thanks, I'm familiar with COALESCE, so perhaps I should have thought of that myself :) Hang on, I was too quick the

2020-11-13 23:44:39 +0200 commented answer How do I check for NULL and/or input errors in macros?

Thanks, I'm familiar with COALESCE, so perhaps I should have thought of that myself :) Hang on, I was too quick the

2020-11-13 23:23:56 +0200 commented answer How do I check for NULL and/or input errors in macros?

Thanks, I'm familiar with COALESCE, so perhaps I should have thought of that myself :)

2020-11-13 23:22:20 +0200 marked best answer How do I check for NULL and/or input errors in macros?

I have a subform that links to an "ID" value from it's parent form. The subform has a push button that activates a macro, which reads the "ID" from the linked field, and passes it to an SQL command.

iValue = oForm.Columns.getByName("ID").Value

It can occur that the "ID" value is NULL (they are are selected by a query). This causes an error in the macro:

image description

I'd like to avoid this by error checking, but I cannot find the relevant code in the LibreOffice Base Guide.

I've discovered that adding a field "fixes" the problem. The code below:

iValue = oForm.getByName("IDField").getCurrentValue()

returns '0' in the case of NULL, and I can always check for that.

However I feel like this solution may not be robust against future updates, or when changing OS.

2020-11-13 22:00:36 +0200 asked a question How do I check for NULL and/or input errors in macros?

How do I check for NULL and/or input errors in macros? I have a subform that links to an "ID" value from it's parent for

2020-10-30 19:27:32 +0200 commented answer SQL code for filter tables in Firebird

It looks I was too hasty the first time around, and made some syntax error. I can now get the user input via parameter t

2020-10-30 16:45:02 +0200 received badge  Famous Question (source)
2020-10-30 04:03:10 +0200 received badge  Notable Question (source)
2020-10-29 22:27:55 +0200 received badge  Commentator
2020-10-29 22:27:55 +0200 commented answer SQL code for filter tables in Firebird

I tried this a bit quickly, but couldn't make it work. Using LO Base 6.4 on Windows 10.

2020-10-29 22:23:38 +0200 marked best answer SQL code for filter tables in Firebird

I'm used to using this syntax when employing filter tables to forms in HSQLDB:

SELECT 
      * 
FROM 
       "tbl_Users" 
WHERE
     ((UPPER("FirstName")    LIKE '%' || UPPER (:Var_FN) || '%' ) OR (:Var_FN  IS NULL))

I cannot get this to work in FireBird, and it seems to have to do with the second part in the WHERE clasue: "OR (:Var_FN IS NULL))"

What's the alternative? I need a blank field to select all records from the filtered table.

2020-10-29 22:23:36 +0200 commented answer SQL code for filter tables in Firebird

I have in several tables a "Description" field, which in HSQLDB is MEMO, and I think I'll convert to VARCHAR(100). But I

2020-10-29 08:14:36 +0200 commented answer SQL code for filter tables in Firebird

Thank you Ratslinger. While this solution works, it seems I have to type as many characters into COALESCE as the user m

2020-10-29 07:49:15 +0200 received badge  Popular Question (source)
2020-10-28 22:00:53 +0200 asked a question SQL code for filter tables in Firebird

SQL code for filter tables in Firebird I'm used to using this syntax when employing filter tables to forms in HSQLDB: S

2020-10-22 23:12:21 +0200 commented answer How do I add records from a filtered table to a junction table?

I guess I'll have to go over to macros at some point, I already need to make one for updating the forms. Unfortunately d

2020-10-20 23:56:59 +0200 received badge  Famous Question (source)
2020-10-20 23:02:25 +0200 edited question How do I add records from a filtered table to a junction table?

How do I add records from a filtered table to a junction table? Updated to add a sample database: C:\fakepath\Transacti

2020-10-20 22:58:31 +0200 commented answer How do I add records from a filtered table to a junction table?

I am assuming that the AMOUNT to be added is the only field that can be populated by the user; the others in the TRAN

2020-10-19 23:19:39 +0200 commented answer How do I add records from a filtered table to a junction table?

So I'm still on HSQLDB and transactions has autovalue ID. I see I can't add images to comments, but what happens is th

2020-10-19 03:37:40 +0200 received badge  Notable Question (source)
2020-10-18 22:59:36 +0200 received badge  Self-Learner (source)
2020-10-18 22:59:36 +0200 received badge  Teacher (source)
2020-10-18 22:32:06 +0200 answered a question How do I add records from a filtered table to a junction table?

So I found a solution, that involves expanding the Filter Table to include criteria fields from both tbl_Parts and tbl_O

2020-10-17 19:17:44 +0200 commented question How do I add records from a filtered table to a junction table?

So, asking this question finally helped me overcome my basic misunderstandings. Frofa's first comment really helped. I h

2020-10-17 19:04:52 +0200 received badge  Popular Question (source)
2020-10-17 11:45:57 +0200 edited question How do I add records from a filtered table to a junction table?

How do I add records from a filtered table to a junction table? Updated to add a sample database: C:\fakepath\Transacti

2020-10-17 11:42:07 +0200 edited question How do I add records from a filtered table to a junction table?

How do I add records from a filtered table to a junction table? Updated to add a sample database: C:\fakepath\Transacti

2020-10-17 11:40:10 +0200 edited question How do I add records from a filtered table to a junction table?

How do I add records from a filtered table to a junction table? Below is a simplified version of the database that I'm t

2020-10-17 11:39:25 +0200 edited question How do I add records from a filtered table to a junction table?

How do I add records from a filtered table to a junction table? Below is a simplified version of the database that I'm t