You are viewing limited content. For full access, please sign in.

Question

Question

Set Custom Row Labels in a Table

asked on December 29, 2021

Hello,

I am building a Client Onboarding process for one of our customers and I need some assistance with some JavaScript. I found similar posts but could not find exactly what I needed in order to customize the Row Labels of the table.

The table will have 6 static Rows like shown in Excel:

I just want the Row labels shown here, to match the Asset Classes listed above:

I was hoping to do this with JavaScript instead of put the list of Asset Classes in SQL and have them populate via a Lookup rule. I think a cool feature for Forms would be to allow us to manually specify unique Row labels and use them as variables to be able to specify a specific rows data.

0 0

Replies

replied on December 29, 2021

If you definitely want a Javascript solution, here's a start...

The column labels have a class name of col0, so we just need to find each of the rows in the table and update the text of the element with the col0 class name.

This example takes the default "row 1", "row 2", etc. and adds the tet "had been edited..." to the end of it.

This assumes the table has a class name of testTable.

$(document).ready(function () {
  
  $('.testTable tr').each(function() {
    
    var currentLabel = $(this).find('.col0').text();
    if (currentLabel != '')
    {
      var newLabel = currentLabel + ' has been edited...';
      $(this).find('.col0').text(newLabel);
    }
        
  });
  
});

1 0
replied on December 30, 2021

I forgot to mention I am using the New Forms in Cloud which I totally forgot doesn't allow me to use JavaScript so I may just have to populate a third column with a lookup to get the results I want. As always, thanks for your assistance. I will throw this JavaScript in our library for future use!

0 0
replied on December 30, 2021

That's a bummer.  Sorry.

0 0
replied on December 30, 2021

Do you not have an option to use the "classic editor" when creating some forms?  From what I read, Javascript wasn't available on the new editor, but was still available if you selected the classic editor.  That being said, I don't know what is different in Cloud.

0 0
replied on January 3, 2022

The new form in the cloud is the same as on premise, both of them do not support customize row label for each row with fixed number of rows yet.

1 0
replied on January 4, 2022

Thanks for helping to clarify @████████.

Since that functionality worked in version 10, can you clarify further:

It doesn't work at all in version 11 or it doesn't work in version 11 with the new editor, but would still work in version 11 if the classic editor option was selected on the form design?

0 0
replied on January 4, 2022

Hi Matt, I can confirm that Multiple Row Labels is available in the Classic Form Designer in both V11 OnPrem and LF Cloud as it was in V10

The New Designer does not support this in either OnPrem or Cloud

1 0
replied on January 4, 2022

Thank you @████████!

I'm sorry @████████, but it looks like unless you are using the classic designer, this isn't going to be possible for you, both because of the functionality not yet being added to the new designer and Javascript not yet being available on the new designer.

1 0
replied on December 29, 2021 Show version history

If there are a fixed number of rows in your table, you can set the row labels manually from the Layout page.

 

0 0
replied on December 30, 2021

Hi Matt!

Am I just confused where this can be done? I only see this option for Row labelling and it doesnt allow me to make each row label unique other than the number. If there is a way to do this natively that would be the easiest route!

0 0
replied on December 30, 2021 Show version history

I'm not on version 11 yet, so maybe it's something that they got rid of in version 11.

Or maybe it's available on the classic editor, but not the new editor - and from what I've read, you can choose on an individual form basis which editor you want to you.

This is what I see on version 10 when setting a table to a fixed number of rows:

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.