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. 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'] |
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.
|
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.
|
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.
|
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
|
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"]="";
|
jadachDevClub member 5/27/2019 | |
Sounds like this is on the database side. Nothing to do with PHPRunner. |
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.
|
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.
|
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]
|