This topic is locked
[SOLVED]

 Remove Blank in Edit As o Inline Edit

5/22/2019 2:00:39 PM
PHPRunner General questions
D
Daviant author

Regards;

I have a problem that I have not been able to solve.

I have a field in a table that has 50 maximum capacity characters and the field content is variable but does not reach 50 characters. The problem is that all records are stored by filling in with blanks to complete 50 characters.

In Edit As I have tried to use different combinations of trim (), rtrim () but the field keeps appearing with the blanks at the end which prevents me from inserting characters until some blanks are removed.

Any idea how to eliminate these spaces in Inline Edit or Edit page?
Google translator

A
acpan 5/22/2019

It seems you may have default value set in the add or edit page in PHPR as empty spaces for the field.

Maybe you accidentally press space bar many times at the default value field?
If you can't get it right, i suggest you re-create the page.
ACP



Regards;

I have a problem that I have not been able to solve.

I have a field in a table that has 50 maximum capacity characters and the field content is variable but does not reach 50 characters. The problem is that all records are stored by filling in with blanks to complete 50 characters.

In Edit As I have tried to use different combinations of trim (), rtrim () but the field keeps appearing with the blanks at the end which prevents me from inserting characters until some blanks are removed.

Any idea how to eliminate these spaces in Inline Edit or Edit page?
Google translator

D
Daviant author 5/22/2019

[quote name='acpan' date='22 May 2019 - 06:01 PM' timestamp='1558562479' post='87816']

It seems you may have default value set in the add or edit page in PHPR as empty spaces for the field.

Maybe you accidentally press space bar many times at the default value field?
If you can't get it right, i suggest you re-create the page.
ACP
Actually the theme is can be summarized in how to eliminate the blank spaces to the right when activating Inline Edit or Edit .... I have tried with Rtrim (), trim (), but they are not deleted when editing .

admin 5/23/2019

As a first step make sure you are not using CHAR data type. Switch to VARCHAR if you are. CHAR data will be padded with spaces to fit the field size.

D
Daviant author 5/24/2019



As a first step make sure you are not using CHAR data type. Switch to VARCHAR if you are. CHAR data will be padded with spaces to fit the field size.



Greetings. I checked the structure of the table and it is really of type "VARCHAR"
When adding Rtrim () in the "Field Event" button, option "Editing", tab "Server" it is possible to eliminate the blank spaces when entering the field with "Inline Edit", but each time a key is pressed go back to the end of the text, so you have to be fast with the keyboard.

lefty 5/24/2019



Greetings. I checked the structure of the table and it is really of type "VARCHAR"
When adding Rtrim () in the "Field Event" button, option "Editing", tab "Server" it is possible to eliminate the blank spaces when entering the field with "Inline Edit", but each time a key is pressed go back to the end of the text, so you have to be fast with the keyboard.


Strange issue , I have never seen this issue before in PHPrunner .
What version are you using and build number?

How many characters are set in the VARCHAR field in the database not PHPrunner.

Another question is Default Value or Value of field coming from another table through an event where the field in other table has database field as CHAR setup in database? If not then

I would just use Acpan's advise and rebuild the page and/or reset the page . It should resolve the issue.

Another option is to uncheck the field and remove from your project in query designer. Then Save project without that field and Open project then re-insert the field then set your properties again.

Delete and Backup Output file in folder and do a Full build.

Quicker to do this way then trying to figure out the one field issue as it is not usual for this issue in PHPrunner.

If you are using final build of a version and this still occurs after above , then you should probably open a ticket with Support and upload your project to demo account.

D
Daviant author 5/24/2019



Strange issue , I have never seen this issue before in PHPrunner .
What version are you using and build number?

How many characters are set in the VARCHAR field in the database not PHPrunner.

Another question is Default Value or Value of field coming from another table through an event where the field in other table has database field as CHAR setup in database? If not then

I would just use Acpan's advise and rebuild the page and/or reset the page . It should resolve the issue.

Another option is to uncheck the field and remove from your project in query designer. Then Save project without that field and Open project then re-insert the field then set your properties again.

Delete and Backup Output file and do a Full build.

Quicker to do this way then trying to figure out the one field issue as it is not usual for this issue in PHPrunner.

If you are using final build of a version and this still occurs after above , then you should probably open a ticket with Support and upload your project to demo account.


I explain a little more. The Database can not be modified just to access it. It is a Sql Server database. The data is stored in it through an external application and unfortunately is stored filling the entire field with blank spaces.
Google translator

lefty 5/24/2019



I explain a little more. The Database can not be modified just to access it. It is a Sql Server database. The data is stored in it through an external application and unfortunately is stored filling the entire field with blank spaces.
Google translator


Hmm:

Not Tested but try in Before Process Record Event Edit.
$values["YourFieldName"] = RTRIM('" .$values["YourFieldName"]."');
If you have an add page Then just use same event but use
$values["YourFieldName"]="";

D
Daviant author 5/27/2019



Hmm:

Not Tested but try in Before Process Record Event Edit.
$values["YourFieldName"] = RTRIM('" .$values["YourFieldName"]."');
If you have an add page Then just use same event but use
$values["YourFieldName"]="";



I tried with this possible solution, but it does not work, thanks.

jadachDevClub member 5/27/2019

Sounds like this is on the database side. Nothing to do with PHPRunner.

Without access to the database itself, you are at a disadvantage trying to figure this out.

D
Daviant author 5/27/2019



Sounds like this is on the database side. Nothing to do with PHPRunner.

Without access to the database itself, you are at a disadvantage trying to figure this out.


Access to the database I have. What can not be done is to modify it because it is used by an external application. PHPrunner connects to it normally and if you can modify its content without problems. What I need to do is remove the blank spaces to the right when entering Edit or Inline Edit mode and it does not work for me.
Google translator

lefty 5/27/2019



Sounds like this is on the database side. Nothing to do with PHPRunner.

Without access to the database itself, you are at a disadvantage trying to figure this out.


Try the code I supplied in my last post in Process Record Values not Before Process record ( remember $values["yourfieldname"] is case sensitive ) . My Mistake. If that don't work then see below.
You also need to provide which version of PHPrunner and build you are using , just to make sure it was not an issue in your build. Always provide this when posting to the forum.
For Testing Purposes to see if you can empty entire field:

Can you run an update query to the database ? Run an update query in PHPrunner Process Record Values event.
[color="#1C2837"]
[color="#1C2837"][font="arial, verdana, tahoma, sans-serif"][size="2"]Then Test there. If you find that the whitespaces cannot be removed from PHPrunner which is highly unlikely , then you need to contact your outside source for a fix. Don't know what else you can do.[/size]
[/b][/size][/font]

D
Daviant author 5/31/2019



Try the code I supplied in my last post in Process Record Values not Before Process record ( remember $values["yourfieldname"] is case sensitive ) . My Mistake. If that don't work then see below.
You also need to provide which version of PHPrunner and build you are using , just to make sure it was not an issue in your build. Always provide this when posting to the forum.
For Testing Purposes to see if you can empty entire field:

Can you run an update query to the database ? Run an update query in PHPrunner Process Record Values event.
[color="#1C2837"]
[color="#1C2837"][font="arial, verdana, tahoma, sans-serif"][size="2"]Then Test there. If you find that the whitespaces cannot be removed from PHPrunner which is highly unlikely , then you need to contact your outside source for a fix. Don't know what else you can do.[/size]
[/b][/size][/font]


Thank you;

I tried what you tell me and if it works <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87874&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I had to change the code of:
$ values ["YourFieldName"] = RTRIM ('". $ values [" YourFieldName "]."');
by
$ values ["YourFieldName"] = RTRIM ($ values ["YourFieldName"]);
Thank you again
(Google translator)