Beginner need some help August 06, 2020, 05:02:35 PM New to this environment, I have a lot of experience with dbase on windows systems. Anyway I have a pretty simple question I made an application to start with the data files and when I go to add a record I have to type in the value of the main user field in order for it to stay in the list of records for that user. Is there anyway to add a record where it will consistently fills in the user field with the value of the user. ?I experimented around with a few things such as below but then I get a error 2300 which I guess means you can't update primary field? put this in after page..... $db->rawQuery("UPDATE customers SET user=$USER_ID WHERE id='$rec_id' "); *********this worked..$xxx = USER_ID;$db->rawQuery("UPDATE customers SET user=$xxx WHERE id='$rec_id' ");thank you! Quote Selected Last Edit: August 07, 2020, 01:57:00 AM by nightcasters
Re: Beginner need some help Reply #1 – August 07, 2020, 08:44:36 AM @nightcasters please use the DefaultValue configuration in Add Page Field Properties to automatically fill user value to the field. Here is the phprad doc to help you understand more about phprad. Quote Selected
Re: Beginner need some help Reply #3 – August 10, 2020, 12:53:55 AM Still having some difficulty with this issue, I started a new project with 2 tables, customer and invoice.. pretty simple.. If I add a record to a table, It does not plug in the user field with user id so it wont show up on the list page... Unless I actually type in the field value of the user ID.but It can work if add this, $xxx = USER_ID; $db->rawQuery("UPDATE invoices SET user=$xxx WHERE id='$rec_id' ");but shouldnt it fill this value if userid when I add a record with the add page on its own? Is there a setting to check for this?on authentication page there is a field call user and it is assigned to userid field. on user record management I have user.user and userAm I setting this up wrong? maybe I have an issue wit reserved words or somnething?thank you! Quote Selected