28 Posts
claudioalfonso
5 years ago
8
Topic

good morning friends
I'm using the sd concat field to capture values from other fields and save though the captured values comes with spaces and I do not wish to have that space.
It looks like this: -1.6544554 , -48.53453
I want this: -1.6544554,-48.53453
sd concat this way: #lat#||[,]||#lon#
How to proceed?

Get a Book for SEBLOD
1283 Posts
Bucklash
5 years ago
6
Level 1

Hi

I haven’t used that field much so don’t know its options but sounds to me like you need a beforestore field,  run some php code ie str_replace or trim on your field”s values

either process the values and then concat or concat then process

28 Posts
claudioalfonso
5 years ago
5
Level 2

but how do I do this? Where is the beforestore? is it in the SD Concat field I'm using?
Hugs

1283 Posts
Bucklash
5 years ago
4
Level 3

beforestore is a field from the code pack collection 

have to add own php to it

https://www.seblod.com/resources/tutorials/using-code-pack

https://www.seblod.com/store/extensions/1854

28 Posts
claudioalfonso
5 years ago
0
Level 4

Thanks for the tip but could not use Field 42 for this?

28 Posts
claudioalfonso
5 years ago
2
Level 4

Hi friend, I'm trying to use field 42 like this in the image in the beforeforstore, not working

1283 Posts
Bucklash
5 years ago
1
Level 5

It should do I would have thought.

But never really used it, only use codepack for stuff like that

4229 Posts
Kadministrator
5 years ago
0
Level 6

You need to use Codepack, 42 uses different events

28 Posts
claudioalfonso
5 years ago
0
Level 1

Resolved Nothing complicated in fact, just add within the field in the option SEPARATOR the value ns it will remove all space between the fields concatenated

kkkkkkkk

Get a Book for SEBLOD