Jump to content

Change Value in Column Y in Tabular Report Based on On Value Present or Not in Column X


Recommended Posts

This is based on a view of ALL Clients and MATCHING CredentialsAndTraining records, therefore there will always be at least one empty record. 

I cannot suppress the blank line due to other needs to have the one record from the Client data side always present. This is fine as far as it goes.

In the tabular report I add an "update" link to enable the user to update existing records. Obviously this is pretty pointless on that empty row that shows up when the Client has no existing records.

So, I need to change the value in "Column Y" in the tabular report based on a value being present or not in "Column X".

e.g. hide the update link when no RID is present.

Since this will only apply to this one unique scenario, I don't care if it's just the link being hidden, or if it's the whole column being hidden.

Ideas?

TIA :0)

 

2019-04-13_9-10-47.thumb.png.a7c1f78020d60c5914bb5394aa67c0ea.png

Link to comment
Share on other sites

OK, I was making this harder on myself than I had to. Simple javascript to check the update URL and hide if matches the url expected w/o an RID value or not, and replace if an exact match is found.

<script>
	var myDiv = document.getElementById("recordUpdateLink");
	if (myDiv.innerHTML == '<a href="/client/credentials-and-training/credentials-and-training-update/?RID=">Update</a>')
	{
 		document.getElementById("recordUpdateLink").innerHTML = "No records found.";
	}
</script>

2019-04-15_9-21-03.thumb.png.c05bc61dc468cd50605cab71759c03eb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...