In my project I have defined a function called Profile_Into_Line(Member_Id) which creates a punctuated user friendly sentence by selecting data from the member's table fields.
I want to display this sentence within the member's profile grid. (The function is compiled into the project's AEX file). The approach I've tried is:
1. I've created a calculated field in the grid called Intro_line which initially equals "This is a calculated field"
2. I've then tried to use the OnGridExecute function to assign the product of Profile_Into_Line(Member_Id) to the Intro_Line field.
The problem is I don't understand the syntax for communication between xBasic and grids. I've "looked around" inside the project's Xbasic produced by Alpha (as suggested in tutorials that stop short of connecting the dots) but it remains a frustrating mystery to me.
To get the Profile_Intro_Line function to execute on the Member_ID from the grid I've tried:
Profile_Intro_Line(e.tmpl.field_info[1].Member_id)
Profile_Intro_Line(e.tmpl.Member_id)
Profile_Intro_Line(e.Member_id)
Profile_Intro_Line(e.session.Member_id)
Profile_Intro_Line(e.rv.session.Member_id)
but none of these syntax attempts successfully retrieve the value of Member_id.
Similarly, I've tried to reassign the value of the field "Intro_Line" to "Hello" (in the absense of a working Profile_Into_Line() function) but no joy with the syntax there either. I've tried:
e.tmpl.field_info[20].Intro_Line = "Hello"
e.tmpl.Intro_Line = "Hello"
e.Intro_Line = "Hello"
e.session.Intro_Line = "Hello"
e.rv.session.Intro_Line = "Hello"
Any suggestions on what I should be doing? In the absence of any proper educational documentation on how to apply Xbasic within grids, are there any simple working examples I could look at?
I want to display this sentence within the member's profile grid. (The function is compiled into the project's AEX file). The approach I've tried is:
1. I've created a calculated field in the grid called Intro_line which initially equals "This is a calculated field"
2. I've then tried to use the OnGridExecute function to assign the product of Profile_Into_Line(Member_Id) to the Intro_Line field.
The problem is I don't understand the syntax for communication between xBasic and grids. I've "looked around" inside the project's Xbasic produced by Alpha (as suggested in tutorials that stop short of connecting the dots) but it remains a frustrating mystery to me.
To get the Profile_Intro_Line function to execute on the Member_ID from the grid I've tried:
Profile_Intro_Line(e.tmpl.field_info[1].Member_id)
Profile_Intro_Line(e.tmpl.Member_id)
Profile_Intro_Line(e.Member_id)
Profile_Intro_Line(e.session.Member_id)
Profile_Intro_Line(e.rv.session.Member_id)
but none of these syntax attempts successfully retrieve the value of Member_id.
Similarly, I've tried to reassign the value of the field "Intro_Line" to "Hello" (in the absense of a working Profile_Into_Line() function) but no joy with the syntax there either. I've tried:
e.tmpl.field_info[20].Intro_Line = "Hello"
e.tmpl.Intro_Line = "Hello"
e.Intro_Line = "Hello"
e.session.Intro_Line = "Hello"
e.rv.session.Intro_Line = "Hello"
Any suggestions on what I should be doing? In the absence of any proper educational documentation on how to apply Xbasic within grids, are there any simple working examples I could look at?
Comment