Can you dynamically change field names with the IOL technique?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
It would be helpful for me to dynamically change field names based on the date the record was created. ie if it was created in March then Field 1 would be March, Field 2 would be April, etc.  I realize this would cause issues in reports where records with different creation months, so I don't know if it would be possible.  I haven't been able to find anything similar in Dan's Pasties database, so I thought I would ask.
Photo of Jessica

Jessica

  • 414 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 27,954 Points 20k badge 2x thumb
This can be done and there might be a use case for {new, edit, view} forms but I think it would be confusing what label showed up on a report. Are you sure this is a feature you want?
Photo of Jessica

Jessica

  • 414 Points 250 badge 2x thumb
I agree that it has the potential to be confusing on reports.     An alternative (and potentially easier) solution would be for me to create 12 different dashboards (one for each month) then have the user get to it via 1 button.   I know that I could do something like this via a URL formula field in a FORM but, could I put a dynamic button like this on a PAGE?  ie I want 1 button that goes to the March Homepage if the current month is March, the April Homepage if April and I want that button to be found on a home page
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 27,954 Points 20k badge 2x thumb
Knock yourself out. Here is the essential code manually applied from the console:
$("label.fieldLabel b").filter(function() {
  return $(this).text() === "alpha";
}).text("ALPHA");
$("label.fieldLabel b").filter(function() {
  return $(this).text() === "beta";
}).text("BETA");



The four fields are [alpha], [beta], [gamma] and [delta] as show in the report.



You of course would not be substituting the appropriate month for the label not capitalizing the field name. Easy to do but I assume you are going to abandon this idea.
(Edited)