Query Calculated Columns

If you think that something doesn't work in Aware IM post your message here
Post Reply
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Query Calculated Columns

Post by PointsWell »

Creating a calculated column based on a text contcatenation:

Code: Select all

BO.Text1+' '+BO.Text2
Results in the space being stripped in the final output.This happens even if ' ' used
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Query Calculated Columns

Post by joben »

PointsWell wrote: Thu Sep 16, 2021 1:41 am

Code: Select all

BO.Text1+' '+BO.Text2
We use this sort of concatenation frequently. Should work.

What version are you on mate?
Regards, Joakim

Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Query Calculated Columns

Post by PointsWell »

joben wrote: Fri Sep 17, 2021 2:33 pm
PointsWell wrote: Thu Sep 16, 2021 1:41 am

Code: Select all

BO.Text1+' '+BO.Text2
We use this sort of concatenation frequently. Should work.

What version are you on mate?
Latest build.
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Query Calculated Columns

Post by joben »

I am also on latest build (2938) and works for me.
Skärmbild 2021-09-20 091750.png
Skärmbild 2021-09-20 091750.png (7.64 KiB) Viewed 5588 times
Skärmbild 2021-09-20 091802.png
Skärmbild 2021-09-20 091802.png (103.42 KiB) Viewed 5588 times
Are you having the problem only inside queries, or do you have them in form grids as well?
Are there custom javascripts running in the background messing it up for you?
Database table encoding issues?
You did use "Plain text" as calculation result like the image above? (make sure this option is not hidden due to window height)
You are sure you only included plain text fields when concatenating? If number, it might treat it as addition.

Just brainstorming here.
Regards, Joakim

Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Query Calculated Columns

Post by PointsWell »

The issue is that AIM is not dealing with Numbers in a consistent manner:

Concatenations of Numbers with Strings should treat the result as a String.

It does not in Query Calculations. It is stripping the extra space.
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: Query Calculated Columns

Post by joben »

PointsWell wrote: Mon Sep 20, 2021 7:39 am The issue is that AIM is not dealing with Numbers in a consistent manner:

Concatenations of Numbers with Strings should treat the result as a String.

It does not in Query Calculations. It is stripping the extra space.
We use AS_STRING when numbers (maybe dates too?) are involved in concatenation.
But I do agree that mixing numbers and strings should render a string. Would also make the calculated column formula more readable.
Regards, Joakim

Image
Post Reply