I'am trying to hide the Json value of the student field from log files using filter-spec,
this is my filter-spec :
after i applied the flter this is how the data is showing in the log file
all i want it is to replace ("student" : "testStudent") with ("student": "****") instead it is got replaced with ("student: ****)
does anyone have an example on how to hide the json value using filter-spec?
Thanks in advance
It is not actually possible replace a JSON value with a filter. You'd need to use a custom filter or custom handler in order to do this.
You could file a feature request though. It does seem like a decent idea for a filter to be able to filter values in structured formats.
Related
So I have a dynamic table in angular where im passing data in, then creating the table. I want to add some CSS in order to check the values then add some styling onto it. So if the value is a minus number, then display the data in red
I have used attribute data to check the actual data, which works fine until i call to typescript method to generate the data instead of hardcoding the data in, and this is where is goes wrong. So I want to call this method to get the data instead, and it just displays the method name instead of the method return
You can use the attribute binding of data instead of the interpolation if the data returned by the method is not a string - more details here
[attr.data]="getData(header, body)"
I am attempting to get the data from a "value" then save toa variable for later use.
This is the code I'm looking at.
enter image description here
I'm trying to get the jobOrder number of "217703". This changes for every file and there is no other way I've found to get this the JobOrder.
You haven't shown any code. Are you using IE?
Something like:
Ie.document.getElementById("jobOrdersIds").value
I am loading a CSV file via Static Resourced to test my APEX code. I am using the following code in my test:
List<Territory_Zip_Code__c> territoryData = Test.loadData(Territory_Zip_Code__c.sObjectType, TERRITORY_ZIP_CODES_STATIC_RESOURCE_NAME);
The first few lines of the CSV file look like so:
Territory__c,Zip_Code__c
ABC,123
DEF,456
I am getting the following error:
System.StringException: Unknown field: Territory__c
Territory__c is a valid API field name for my custom sObject.
I've also tried adding the sObject name in front of the field name, like My_Territory__c.Territory__c but that didn't work either.
In addition, I tried using the field name, instead of the API name (for example, Territory) but that didn't work either.
There are lots of examples of using Test.loadData with built-in sObjects, such as Account and Contacts, but no examples showing custom sObjects. I'm starting to think this just isn't possible with custom objects.
Using test.loadData most certainly does work with custom objects. The test data CSV header only needs the field names, as you have in your example.
Your code also looks good. The only difference I could spot is that your variable is a strongly typed list. In my code I use a List which seems to work:
List<sObject> testdata = Test.loadData(MyCustomObject__c.sObjectType, 'mytestdatafile');
I have a google chart and want to add a custom tooltip. I found some great answers like this this site and set about doing this with roles. I also found this link about it and it looked like the best way.
My data is being generated via json and I use a php file to create a json feed. The rows I have coded like this
{"cols": [ {"id":"","label":"Period","pattern":""},
{"id":"","label":"Recorded P/L","type":"number", "role":"data"} ,
{"id":"","label": null,"type":"string", "role":"tooltip"},
{"id":"","label":"Best Available P/L","type":"number", "role":"data"},
{"id":"","label": null,"type":"string", "role":"tooltip"}
]
Then it goes on and adds all the data. The problem is when I try to run this I get the error
All series on a given axis must be of the same data type
I have checked the json and that is formed correctly but am not sure what I could be doing wrong.
At least part of your problem is that you're not specifying the type for your first column.
When developing a Data Flow I don't always want to output the results to a destination - but I would like to see the data.
Is there a way to attach a Data viewer to an output without having to have a destination?
The file and raw destination have limitations on the data type they accept - and I don't want to attach conversions just to test/build code.
Is there some kind of output to null ? i could then get a data view on the result set
There is a (free) custom "trash" destination available from a third party:
http://www.sqlis.com/post/Trash-Destination-Adapter.aspx
I usually use Export column transform - if left with default configuration, it does nothing, so it is equivalent to the custom "Trash" destination mentioned by Ed, but you don't have to install anything.
When debugging and wanting to view the data in the buffer, I usually throw in a Union All and connect it below the component who's output I want to see. Then add a Data Viewer on the connector and voila, there it is!
There isn't really. You can use a RecordSet Destination, or a Row Count transform instead.