Function Tablename_DV problem

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
omackeytech
Veteran Member
Posts: 35
Joined: 2014-06-04 13:18

Function Tablename_DV problem

Post by omackeytech » 2017-02-28 05:49

Appgini 5.6

I'm trying to record the user, title field and user id of the person opening the detail view if a record. I can get the user information, date and time with no problem, but the title field seems illusive.

Title is a field in the Safety_Video table, it contains the name of the subject discussed.

Code: Select all

function Safety_Topics_dv($selectedID, $memberInfo, &$html, &$args){
		$mi = getMemberInfo();
		$Ename = $mi['custom'][0]; 
		$UserID = $mi['username'];
		$Sql = "SELECT Title FROM Safety_Topics WHERE Safety_Topics.id = ('$selectedID')";
		$V_title = sql($Sql,$eo);		
		
		$Sql = "INSERT INTO viewed (Employee_Name, Member_ID, Select_Title) VALUES ('$Ename', '$UserID', '$V_title') ";
		sql($Sql, $eo);
		}
		
The program displays a blank screen when the DV is selected.

Post Reply