Quantcast
Channel: ASPRunner forums
Viewing all 2586 articles
Browse latest View live

Default Value Session

$
0
0
Phprunner 9.8 Build 31882 x64

I have a project 1 with After successful login Event :


$_SESSION["FirstName"] = $data["FirstName"];
$_SESSION["LastName"] = $data["LastName"];
$_SESSION["UserName"] = $data["FirstName"].' '.$data["LastName"]

I have a table with Employee Field
I have Employee Field as Readonly and default value is

$_SESSION["FirstName"] . " " . $_SESSION["LastName"]

This does not show in Add page with the above as default or save the record with the Employee field ( blank ) . I have another project 2 same build and the above works fine.

As a workaround I changed newer project to use $_SESSION["UserName"] name works fine, but I am puzzled as to why this does not work in Project 1 as they are identical projects . Just 1 is live and the other is a demo . Same Server different domain vps.

Any Ideas out there for future reference?

Master-detail add record

$
0
0
In a master-detail table that i have set add/edit record for detail to be on popup form and allow adding detail records on new master records, if i add a new master record the detail add new record operates inline rather than popup.

PHPRunner Enterprise DAL(Data Access Layer) script

$
0
0
I am using PHPRunner Enterprise 10.0 I am having trouble with DAL(Data Access Layer) connection to read from one System running AIX DB2 database to another system running Linux, MySQL with Databases having the same table and fields. I have searched for example but could not find any. In this code example I tried to read from a system running AIX DB2 database JMALIB table MDEBTOR and write to Linux, MySQL table mdebtor on another system. I want to read all the records from AIX DB2 database JMALIB table MDEBTOR and insert(add) them to the Linux, MySQL table mdebtor:


global $dal;
$table = $dal->Table("JMALIB.'MDEBTOR', 'JMALIB', 'ODBC:i270')");
$rs = $table->QueryAll();
while ($data = db_fetch_array($rs))
{
INSERT INTO mdebtor 
$rs-Value["BRANCH"]=$values["BRANCH"];
$rs-Value["CLIENT"]=$values["CLIENT"];
$rs-Value["DEBTNO"]=$values["DEBTNO"];
$rs-Value["DNAME"]=$values["DNAME"];
$rs-Value["ADDR"]=$values["ADDR"];
$rs-Value["ADDR1"]=$values["ADDR1"];
$rs-Value["DCITY"]=$values["DCITY"];
$rs-Value["DSTATE"]=$values["DSTATE"];
$rs-Value["DZIP"]=$values["DZIP"];

}



I have created a new project in PHPRunner Enterprise and have the AIX DB2 database JMALIB table MDEBTOR
connected ODBC the Linux, MySQL table mdebtor is connected using URL on local network.

What is the proper syntax for the DAL(Data Access Layer) script?

Behaviour of labels

$
0
0
PHPR 10 / 32290

I deleted some LABELS on list page. This works as expected on desktop version.
On mobile version the labels are still visible.
What do I have to change ?

Show/Hide field if a multi-select lookup contains a certain value

$
0
0
Hi Guys,

On my add page I have a have a field call "qualifications"

This field is set to a lookup wizard of the qualifications table

The lookup wizard is set to a checkbox list, which also allows multiple selection of values.

I have added a javascript onload event to show/hide a field called "qualifications_Other" if "Other" is selected from the "qualifications" lookup wizard checkbox list control.

Here is the javascript onload code:

//Start.............................................................................
var ctrlIvcX841 = Runner.getControl(pageid, 'qualifications');
var ctrlIvcX841T = Runner.getControl(pageid, 'qualifications_Other');

pageObj.hideField("qualifications_Other");

ctrlIvcX841.on('change', function(e) {

if (this.getValue()!= "Other"){

pageObj.showField("qualifications_Other");
ctrlIvcX841T.addValidation("IsRequired");
}

else {

pageObj.hideField("qualifications_Other");
ctrlIvcX841T.removeValidation("IsRequired");
ctrlIvcX841T.setValue('');

}
});
//End.............................................................................

This event works well if the exact value ONLY is selected by the user,

However because the user can select multiple values, if a user selects more than one value from the "qualifications" lookup wizard checkbox list control, the show/hide process is broken.

I was just wondering if possible can I change the operator or something to show or hide the field even if MULTIPLE values ("Other" being the trigger value) are selected in the"qualifications" lookup wizard checkbox list control?

I had a workaround for the problem below phpRv9 which was...

To new a field in the DB called qualifications_OtherCheck and position it directly under the check box list on add/edit pages If checked, show qualifications_Other, else hide.

This solution worked great in V9 however in V10 I'm struggling to position the new field directly under the existing "qualifications_Other" to make it look like the same control to the user.

Therefore I'm wondering if anyone has a way to check to see if a multi-select lookup contains a certain value.

Many thanks

J

Left bar and top menu on same page for common menu page

$
0
0
Hi Guys,

Just wondering has anyone managed to adjust layout settings etc in the common menu page, get both the left bar and top menu on same page for the menu page?

I could manage this on V9 and I found it a great way to place the admin button in the top menu corner, and a nice side menu with links for user navigation.

Now I have to choose between the two, so I stick with top navigation mostly.

Any one got any ideas how to manege both in V10 menu page?

All the best,

J

Turning Row Red after expire date

$
0
0
I have been trying to figure out the code to turn a row red if the expire date has been met.
I have a table called: truck_expiration_datesThen in that table I have:truck_number int 11description varchar 50date date
The date field is the date the permit expires.I have been trying to use stuff from this post The code I came up with and put in before display on the list event is:
global $record;
if ($data["date"]>"CURDATE()");
else
$row["rowstyle"]='style="background:red"';
Is that code work for PHPrunner 10? it was all back in 5 and 6 days.
I have tried just:$row["rowstyle"]='style="background:red"';
to see if the row would change but nothing.Any help would be great on this..
Thank AllJames Tandy

Unable to start embedded server PHPRunner 10

$
0
0
Updated 04-02-2019


When i open my recently installed PHPRunner 10 I get a Window that says

Webserver unexpectedly finished.

Do you want to attempt to restart it?

Click no to close the application immediately.

if I click no then programme closes. If I click yes it simply after a few moments brings up the same window. If I do this a couple of times and then attempt to open the programme again it generally loads up ok. Now it is coming up with a window that reads "Unable to start embedded server" and I am now unable to open the programme.

Has anyone experienced this and if so is there a cure?

Regards,
Carl.

[SOLVED] I need guidance for a website based on the geocoding / geolocation / maps

$
0
0
Hi,

I need to develop a website where a main functionality is the tracking of the equipments that are geographic distributed. In the "customers quotes" I found a mention about a Community Network Mapping website (https://www.cmnbc.ca) that was build using PHPRunner. This website have a superb geographic atlas (http://cmnmaps.ca/AIP/) that convinced me that the PHPRunner is the tool that I need for my project. Of course, I'm a newbie for PHPRunner and I need guidance (or maybe paid help/support if I can't do this alone) to build a somehow similar functionality for my project. In this project I need to display on a map the location of the equipments and I need to filter those displayed equipments by location, type or many other criteria like "50 miles around a specified address" and so on. Also I need to be able to return the address (or at least the geographic coordinates) when I click somewhere on the map and probably other functionalities related with maps and locations. Do you have any hint ?

Lat and Long not saving

$
0
0
I am having a few problems with my geo-locations

I have followed everything I seen on the forums about the latitude/longitude.
1st and main problem:The lat and lng are not saving to the database. I have made those decimal 10 and 6 and stays blank. I have also trying the double and still stays blank.In Pages. I clicked on geocoding. Checked the checkbox to use. Then in my fields I have lat and lng as on my database.For the fields below I add address, city, state, zip, and country
With it not saving to the database I will end up getting charged by Google..

2nd Problem I am having:The maps are working for the list page but not the view page.
If anyone else had these problems, Please let me know how you fixed them..
Thank You.James Tandy

Add Multiple Records

$
0
0
Dears
thanks for PHPRunner team

i need help in the following

i have these 3 tables
table1 Products_Setup with fields [Product_GTIN] , [Product_UPN]
table2 Stores with fields [Store_Code] , [Store_Title] >>> have 100 stores records
table3 Product_Balance [Product_GTIN] , [Balance] ,[Store_Code]

i need when i add new product in table1 Products_Setup add event to insert in table3 Product_Balance [Product_GTIN] , [Balance] ,[Store_Code]

example: i need inserting balance 0 by default for the new added product to all stores in table3
to be cleared generate records by stores_Code for the new product by Balance 0 in table 3

Thanks alot for any help

Fields does not change on search page

$
0
0
Hi I have noticed that if you change fields on list, add search etc from fields tab, you still see those fields on search in designer and editor and in generated app you can see in advance search.

Some advice on Open Sourcing a project

$
0
0
Dear All

Was wondering - if I was wanting to open source the resulting code of a project.

What is the minimum viable code that could be published (I take it the output directory)

And beyond web.config what do I need to obfuscate or delete that would prevent users from seeing my connection strings to my development databases ( I use azure sql server)

I can see a .sln file for instance which I believe might be a visual studio project file

Thanks for advice

Mark

I understand that I would have to publish a bank database with all keys / indexes / tables and field names

Adding Options to Import page

$
0
0
I am trying to add options to the import page (such as 'skip duplicates') by adding a checkbox input in the page editor under HTML mode. I am then trying to get the value of the checkbox when I am importing the records.

I tried to use the following help topic to do this:
https://xlinesoft.com/asprunnernet/docs/add_custom_field_to_form.htm

However I cannot seem to get the value in my C# code. The postvalue["test"] does not exist when I am in the 'Import page: Before process" function.

Custom button redirect in user menu

$
0
0
(I might be doing all this wrong again...)

I'm on the latest build of Version 10.

I wanted a link to the user_table edit page in the top-right default menu of PHPR.
(Yes, I read https://xlinesoft.com/phprunner/docs/add_link_to_user_profile_to_menu.htm on how to add it to the menubar, but users would like to have it in the dropdown menu where you also can log out / change password etc).

So I added a custom button in Designer on "Common pages", then put it in {$username} group (see screenshot) and added a location.href to the use_table_edit.php page.
That all works fine. But this menu item is not available on other screens. Only on the page after login.

Is it possible to define this globally with this approach?

Thanks!

Posted Image

Receive parameter in URL and pass to PHPRunner application

$
0
0
I want to receive some parameters in URL before the website (which developed in PHPRunner) initiates and then save the parameter values in the database


Example URL:

https://phprunnerdevelopedapp.com/?ip=192.168.0.1&port=6666&user=bob&dateofbirth=120882&group=hotel_yx&user_url=http://www.example.com


Any guidance on how to begin with, I don't see any event like before application initializes etc.

Resize fields on inline add New version of phprunner

$
0
0
I have a dropdown box on a inline add. it only show s like 4 characters. Unless you hit drop down. How do you increase the default size of the field in the new version.
I think we use to just stretch it out in old designer. The new designer seems like we lost some functionality on arranging the pages. Maybe it is just me.

Security question

$
0
0
I'm on phpr 10, using static persmissions, with user groups default, admin, and users (I'm using the group-name as groupID field value).
This small project only has an administrator and users that can register.

Newly (successfully) registered users should automatically belong to the group 'users'.

In other words:
1) should I include the group field on the registration page with a default value of 'users' with no other choice?
-->is this safe from frontend-hacking, i.e.: user supplying another value for the POST back to the server (with parameter 'admin'). So: does the server only accept 'users' as a value in this scenario or would I need to add validation?

2) or is it better to not include the group field on the registration page and write the value 'users' in the after successful registration event to the appropriate field?
(and: would this also be safe from user manipulations by supplying addiitional (guessed) parameters in the POST back?)

I hope I was clear enough. Feeling a bit paranoid at the moment;-)
Thanks very much.

[SOLVED] Autofill in a field checkbox list

$
0
0
hi,The autofill does not work when it comes to several checkboxes, in the database it saves me for example 1,2,3

Posted Image

all conditions over same field (Search question)

$
0
0
You can add the same search field >1 time in the search panel.

Question: is it possible to use this to do a search "contains TermA AND contains TermB" ?
In my tests it always does an any (OR) search in this scenario, independently on the selection in the dropdown (any condition / all conditions).

In other words: a query of the form (pseudo-SQL): SELECT....WHERE searchField like "%foo%" AND searchField like "%bar%"
Viewing all 2586 articles
Browse latest View live