To resolve a reference in a word template created

lec
Bronze 4
Bronze 4

Hi, 

I have created a doc template as below to generate an invoice like list. 

<<start>>

<<Student ID>>

<<Dated>>

<<Bank>>

<<Account No.>>

<<end>>

The data for fields comes from table `bankdetails`. The Student ID field references the table 'students` which has Student ID and Student Name. 

I wish to pull out and display the Student Name in place of Student ID in the template. Is there some formula that I may use to do that? I don't want to use a virtual column to pull the Student Name into `bankdetails` and then use field in the table above. 

Thanks 

Solved Solved
0 11 260
1 ACCEPTED SOLUTION

Please try  in place of <<Student ID>> the following

<<[Student ID].[Student Name]>>

View solution in original post

11 REPLIES 11

Please try  in place of <<Student ID>> the following

<<[Student ID].[Student Name]>>

Hey thanks, that worked great ! So, as I understand it, since Student ID is a reference field, it can be used to pull out any value from it's parent table. Is that correct and is that how it works ? 

Thanks again !

Thanks for this link.  

lec
Bronze 4
Bronze 4

Hi, while this is solved perfectly, I have a related question. I have another field in the table called Status that has a value "Opened" which I want to change to "Closed" for all the rows in the loop in the template. Is there any way to change the value of that field in the table to "Closed" as the template runs through to display it's rows?

Thank You.

lec
Bronze 4
Bronze 4

Hi, May I request some of the experts on the forum to reply to this. Or is it better if I post this as a fresh question again? 

Thanks 

Yes, in general it is better to post a new query as a new post.

Anyway with latest query, could you share more details on the requirement.


@lec wrote:

. I have another field in the table called Status that has a value "Opened" which I want to change to "Closed" for all the rows in the loop in the template.


Do you want to force the value "Closed" only in template and hence in the report in spite of Status column's actual value being "Opened" in the backend database and so also in the app display? 

 

lec
Bronze 4
Bronze 4

Hi, Thanks for the response. In fact I want just the opposite. I want to change the values in the database to closed, indicating that the status for those that were open has been closed now. I do not wish to display any value of status, opened or closed on the doc template. I was hoping to that using some query in the template itself by using some small script on the form. 

Thanks. 

lec
Bronze 4
Bronze 4

Hi experts, is there any possibility of a solution for this one? Thanks.

Nothing in a template can modify data in your data source.

Use a data change action to modify the values in your data. Likely, you can include the action in the same automation that generates your invoice.

lec
Bronze 4
Bronze 4

 Hi, Thanks for the reply. I tried doing that but seem not to be getting the result I want. I'll start a new thread for this. 

Thank you.

 

Top Labels in this Space