Submitted by jnmwarren on 2019/02/19 14:30
I have two fields: Fname and Lname. They are also in two separate columns on my grid. I want to combine the two fields and have one field named ContactName. And I also want the new field as one column on my grid. I have not been able to find the answer. Or, if it is even possible.

Comments

 It's possible, I would need help though to implement it
 
Have a look in the field properties dialogue for 'FileFullName' -- see the script under 'options'.
On second thoughts, here it is:
 
<SOURCE>SELECT ¯qFileRef.ItemID, [FilePath] & [FileName] AS FileFullName FROM (¯qFileRef LEFT JOIN ¯qFilePath ON ¯qFileRef.ItemID = ¯qFilePath.ItemID) LEFT JOIN ¯qFileName ON ¯qFileRef.ItemID = ¯qFileName.ItemID;</SOURCE>

Hi !
 
Tom's example uses smart fields. See [node986] for details. I'll add a sample for your specific case. 
 
Another way is to use a row equation: enter this row equation for the field ContactName: = [Fname] & " " & [Lname]. And press the refresh button next to the row equation
It is simpler and actually stores the full name in the database.
The smart field method does not store it in the database, it is computed
 
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/02/19 16:25

In reply to by Pierre_Admin

I put the row equation in and recalculated the column rows. IQ states that the column was recalculated. I also clicked on View>Refresh. But the new ContactName column is blank, no data is showing in the field.

Pierre_Admin

2019/02/19 16:42

In reply to by jnmwarren

Hi !
 
It's working here, so perhaps report back the exact steps taken.
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/02/19 17:53

In reply to by Pierre_Admin

I went to Tools>Manage Fields and added the new field ContactName. I then went to the Equation section for ContactName and added a Row Equation of ContactName: = [Fname] & " " & [Lname] and clicked on the Refresh button. After the refresh finished I saved and closed the window. From there I added the new field as a column in my grid. Finally, I went to View>Refresh to update the grid. And the new field/column is showing blank. I figured it out that the ContactName: was in the formula and that prevented the calculation to work correctly. Once I removed this part of the equation and refreshed it worked as it should.

jnmwarren

2019/02/19 19:05

In reply to by Pierre_Admin

I read about the use of '=' for parsing a field. But when the field gets parsed where do the values go? I have a number of 4.0.65.197_164634. I need to parse the number as such: Major Ver 4.0, Minor Ver 65, Hotfix 197 Build Ver 164634. How can this be done?

Pierre_Admin

2019/02/19 19:11

In reply to by jnmwarren

I'm a bit lost here, how does this relate to your original question ?
Can you detail the parsing you want to do ?
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/02/20 06:54

In reply to by Pierre_Admin

 Sorry, the parsing question is not related. I have moved the question to a new thread. To avoid any confusion.