Multiple Objects in 1 Textbox?
Multiple Objects in 1 Textbox?
I was wondering if it's possible to have multiple objects in 1 textbox that are comma separated?
For example, I'm creating an excel report and one of my cells wants to have a list of all of the LocationType in my JSON object. So as opposed to creating a report that has 2 different cells (one of each LocationType). It would be 1 textbox, that lists both LocationTypes at once.
For example: instead of a textbox for "Interchange", and then another for "Point Location", this one textbox will say "Interchange, Point Location"
For example, I'm creating an excel report and one of my cells wants to have a list of all of the LocationType in my JSON object. So as opposed to creating a report that has 2 different cells (one of each LocationType). It would be 1 textbox, that lists both LocationTypes at once.
For example: instead of a textbox for "Interchange", and then another for "Point Location", this one textbox will say "Interchange, Point Location"
- Attachments
-
- Screen Shot 2024-02-26 at 6.44.52 PM.png (269.92 KiB) Viewed 951 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Multiple Objects in 1 Textbox?
Hello,
You can use the string the JoinColumnContent function:
JoinColumnContent(object dataSource, string columnName, string delimiter)
Writes all the values of the data source column through the separator as a string.
Thank you.
You can use the string the JoinColumnContent function:
JoinColumnContent(object dataSource, string columnName, string delimiter)
Writes all the values of the data source column through the separator as a string.
Thank you.
Re: Multiple Objects in 1 Textbox?
Hi @Lech,
I'm having some difficulty understanding that function. If I want a list of all of the LocationTypes separated by a comma, would my function look like:
JoinColumnContent(Projects_CurrentProjectRevision_LocationDetails.LocationType, "LocationType", ",").
I'm having some difficulty understanding that function. If I want a list of all of the LocationTypes separated by a comma, would my function look like:
JoinColumnContent(Projects_CurrentProjectRevision_LocationDetails.LocationType, "LocationType", ",").
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Multiple Objects in 1 Textbox?
Hello,
Should be:
JoinColumnContent(Projects_CurrentProjectRevision_LocationDetails, "LocationType", ",")
Thank you.
Should be:
JoinColumnContent(Projects_CurrentProjectRevision_LocationDetails, "LocationType", ",")
Thank you.
Re: Multiple Objects in 1 Textbox?
Hi Lech, I made a simple Sample report just trying to get all of my ProjectIDs, but it does not seem to be working. Could you please assist? Thank you!
- Attachments
-
- JoinColumnContent.mrt
- (49.64 KiB) Downloaded 70 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Multiple Objects in 1 Textbox?
Hello,
All expressions in the Text components should be in curly brackets:
{JoinColumnContent(Projects_CurrentProjectRevision, "ClientProjectId", ",")}
Thank you.
All expressions in the Text components should be in curly brackets:
{JoinColumnContent(Projects_CurrentProjectRevision, "ClientProjectId", ",")}
Thank you.
Re: Multiple Objects in 1 Textbox?
Hi Lech, thank you for responding. That solution seemed to work for basic databands, but I'm running into issues when I use groupheaderbands. In the screenshot, I know that the first line project CC20130027 has 2 LocationTypes: "N/A" and "Hwy Segment".
I am able to get both of these to show if I use a normal databand, but in this case where I'm trying to create a groupheaderband I am unable to get the values to show. I've linked my mrt file and put the last 2 columns as the testing columns. The reason I'm using a groupheaderband is because I essentially need to put 3 objects worth of data in my JSON onto 1 single line to make a spreadsheet.
Please advise
I am able to get both of these to show if I use a normal databand, but in this case where I'm trying to create a groupheaderband I am unable to get the values to show. I've linked my mrt file and put the last 2 columns as the testing columns. The reason I'm using a groupheaderband is because I essentially need to put 3 objects worth of data in my JSON onto 1 single line to make a spreadsheet.
Please advise
- Attachments
-
- JoinColumnContent Test.mrt
- (92.14 KiB) Downloaded 75 times
-
- Screen Shot 2024-03-05 at 1.39.17 PM.png (69.43 KiB) Viewed 886 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Multiple Objects in 1 Textbox?
Hello,
The JoinColumnContent joins all values from the data source and is not depended on any band.
Thank you.
The JoinColumnContent joins all values from the data source and is not depended on any band.
Thank you.
Re: Multiple Objects in 1 Textbox?
Could you take a look at the MRT file that I attached. I have tried many variations, but unable to get the JoinColumnContent expression to work for Groupheaderbands
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Multiple Objects in 1 Textbox?
Hello,
Once again - JoinColumnContent joins all values from the data source, it is not possible to join values only by groups with the JoinColumnContent function.
As a way, you can try to use the Cross-Data component.
Thank you.
Once again - JoinColumnContent joins all values from the data source, it is not possible to join values only by groups with the JoinColumnContent function.
As a way, you can try to use the Cross-Data component.
Thank you.
- Attachments
-
- JoinColumnContent Test.mrt
- (103 KiB) Downloaded 76 times