Not existing column in the current network's table but still visible in the column selection - cytoscape.js

I have imported data table to my cytoscape map for the following continuous mapping accorging to values. After some time, I have imported another data table and then deleted the previous one. The original data are not present in either the node or edge table but I still can see the names of the original columns when selecting column for continuous mapping i. g. for size or colour. Moreover, this warning appears: "The current table does not have the selected column. Please select another column." Do you know how to solve this so that I no longer see the names when these columns are not even in the table?
I would be grateful for any ideas.
I have tried to delete the data table and import the data again but it didn't help. I have also tried to clone current network and import data to the new map, but the old names are still present in the column selection.
Do you know how to solve this so that I no longer see the names when these columns are not even in the table?
I would be grateful for any ideas.

A couple points and then a couple suggestions:
The style is going to "remember" the selected column name, even if you delete it since it doesn't know what to change it to. It will add a warning icon mentioning that the column is missing. You have to choose a new column (or reload the missing column) to address that issue. [I think you know this already, but just stating for completeness :)]
The pulldown list of column names should be updated when you delete table columns. This does indeed sound like a bug.
Are you running the latest Cytoscape 3.9.1?
Have you tried selecting another style and then returning back to this style? That might "refresh" the column name list.
Have you tried saving/restoring the session?

Related

Is there a way to reduce gap between two column headings in DB2

I am working on IBM I series VR7, and running SQL(DB2) using CLLE.
I have a SQL procedure in a TXT file, having below command to create a table in QTEMP.
create table qtemp.FILE1 as (
select
Field1,Field2,Field3,.....Field10 from FILE2 ) with data;
I am calling the above procedure from CLLE using below command.
RUNSQLSTM SRCFILE(MyLib/MySrc) SRCMBR(Proc_txt) COMMIT(*NONE)
And then running below command to generate the spool.
RUNQRY QRYFILE((FILE1)) OUTTYPE(*PRINTER) OUTFORM(*DETAIL) FORMSIZE(60 132)
FORMTYPE(*STD) COPIES(1) LINESPACE(1)
The issue I am facing is that I am getting 2 white spaces between columns while creating the table using the create table command. When that table is converted into a spool file using above RUNQRY command, the fields on the right side truncates as my report width is 132 by default and I can not change it.
If the white spaces in the table created can be reduced to 1, my issue will be resolved.
The SQL I am using IBM i Series' default and DB2 as database. I don't have much idea about their version.
Edit2: Another issue I had was of report having a field in second line. Actually as per requirement a field had to be in the second row under another field. For example I needed field10 under field5. I have fixed it too, read my answer below.
Hope it helps people in need but I really doubt.
Edit1: I have updated the question as requested. Any help would be much appreciated. Thanks.
The short answer is that yes you can define the report to have 1 space between columns, but you have to define the Query400 object to do that. Unfortunately this is not a good place to write a tutorial for Query400. I can get you started though.
Type wrkqry, press enter.
Then put the cursor on the query name field, and press F4. You are now in the tool. You need to create a new query, and define everything about it in this tool. Play around with it, and see if that helps you.
I was able to get what I needed. As others have suggested, I have finally used WRKQRY to control the column spacing. Reduced the column spacing to 1 and was able to get the columns needed in the 132 width.
Another issue I had was of report having a field in second line. Actually as per requirement a field had to be in the second row under another field. For example I needed field10 under field5. So what I did was, I used the Line wrapping feature available in WRKQRY.
How I did:
Create a WRKQRY object and select the file needed.
Sequenced the field I needed in second line, to the bottom.
Go to Select Output Type and Output Form and take Y on Line Wrapping field. Put the
wrapping width equal to your report width. Leave other fields as required.
This way each record will have 10th field in next row, if it has data. You can add as
many as fields.
You may have to add some white spaces to the field for proper alignment. I would
suggest to create a new field and use concat(||) operator available in WRKQRY.
Thanks everyone for helping.

Searching for value in a linked table in power pivot

I have a PowerPivot table that has a column of IDs and a linked table that contains a set of specific IDs that I want to use to create an indicator variable which I can use to sort on in existing tables and charts. Essentially I want:
If the value in column EpisodeID is found anywhere in LostEpisodes[LostID], then return the value "1", otherwise "0".
LostEpisodes is the linked table and LostID is the column that contains the subset of IDs I want to be able to sort on.
I have tried using =IF(VALUES(LostEpisodes[LostID])=[EpisodeID],1,0) but got an error. Is my syntax wrong or should I be using a different approach? Seems simple enough, but I am new to PowerPivot and DAX.
Thanks
OK - So I have found an answer that works and wanted to share. Others may have more elegant solutions, but this worked. This is where I miss MATCH.
I have a linked table called LostEpisodes which contains 2 columns, EpisodeID and Lost (all contain the value of 1 as they are all lost episodes). For my purposes I am manually entering the episode IDs as there are only a few. EpisodeID is also in the main table and is the column I am matching on.
I started with one new column labeled LostLookup with the following formula:
=LOOKUPVALUE(LostEpisodes[Lost],LostEpisodes[EpisodeID],[EpisodeID])
I then created a new column with the following formula:
=if(ISBLANK([LostLookup]),"NotLost","Lost")
This creates the indicator variable I can now use in pivot tables and charts. I have tested it and it works great.
Hope this makes sense!

Is there a (creative) way to hide a text field in Indesign if there is no information in the data merge field?

I am creating a data-merge document in InDesign.
There are various tables that I've created which only show as many rows as there is actual data in the field, through some creative table and cell styles.
Now I've been asked to only have an entirely separate table only show if there is information in any of those fields.
I'm at a total loss. With the way the current structure is set up, I can cause it to not display any text, but it still shows empty header cells and one line of empty row cells.
Pre-DataMerge, with the data fields
Post-Datamerge, with the resulting empty cells
Any creative ideas to hide that table? I was thinking there might be a way to hide the entire text field, if not the table. Maybe a script? I tried one that deletes blank tables, but that didn't seem to work after the data-merge was run.
I am not sure you can get that level of processing with InDesign datamerge. You could think of a script to post remove those tables or use a dedicated plugin such as Easycatalog that can take care of such empty items natively.

SQL Server invalid column name error complaining about column long gone

EDIT: Please read my answer below first, before you decide to read and try to understand the text below. You may not find it's worth it when you see what was going on ;)
I have a weird problem: SQL Server 2008 R2 keeps complaining about an invalid column that is indeed not there anymore, but I'm not using it either!
I can't update any rows in that table anymore from within my own application, where no reference to the column can be found, because I always get this error now.
I then wanted to update straight in SSMS as a test, but when I edit the rows there, I still get this error.
What happened before: I made a column called CertcUL varchar(1), and that worked. After a while it appeared I needed it to be a varchar(30), so I edited the table design and turned it into a varchar(30).
From that moment I saw that I could only update this column when I stored 1 character. When I tried to store more, I got an error warning me about string or binary truncation. So somehow, the previous varchar(1) info was still present in the DB.
When I renamed that column to CertcUL2 or Cert_cUL, the same things kept happening! So changing the column name does not change the underlying cause. Also when just trying to add some characters straight in SSMS.
When I deleted the column, and added a new one with varchar(30) straight away, and called 'test', the same problem remained! This column still only allows me to store one character! The column was the one but last column. Making it the last column does not help either. Only when creating an new column while keeping the other column, I can have columns that behave properly.
So somehow, SQL Server saves some meta data about a column, even when it has been deleted. And does not look at the name, but rather at the order in which the columns are created.
Does anyone have an idea how this can happen, and how I can fix this besides (probably) dropping and recreating the whole table?
Thanks!
Oh my God I feel so stupid...it's a trigger that still contains this column. I just noticed it because when trying to update with an update statement. Only this way I got a proper error message, so I now know what's going on. So stupid that I didn't check the triggers! Sorry about that!
More info: I had an update trigger on this table A, that copies all current values to a history table B that contains the same columns. So I did change the length of the column CertcUL in table A, but forgot about table B. So it was very confusing to see the old column name popping up every time, and see it complianing about string truncation while my column in table A seemed just fine.
Sorry again :)

Use columns.add(...) in Word with non-uniform column widths?

Problem I'm having is that table.Columns.add(ref Object BeforeColumn) requires a reference to another column in the table. However, when I try to access the last column in the table to pass as a reference using table.Columns.Add(table.Columns[table.Columns.Count])
I get the error:
"Cannot access individual columns in this collection because the table has mixed cell widths."
As my current work around, I catch the error, and call table.Columns.DistributeWidth() to make sure the columns are uniform and run the rest of the code. However, I lose the formatting of my cell widths this way, which is unfortunate.
Is there any way I can workaround this without losing the cell width?
(I realize one way is to store every cell's width before running this process, and then re-applying the widths afterward, but this seems like a very costly solution to something that should be simpler)
I've found one way to do it. Here's how I approached it.
*Caution, I'm assuming that the table is uniform. i.e. The number of columns is the same across all the rows. (Note, the API has a Table.uniform function, but the description is not complete. In the API it says "True if all the rows in a table have the same number of columns." However, it also checks if the columns have uniform width).
Instead of using table.Columns.Add(table.Columns[table.Columns.Count]) to add a column before the last below, I select a cell in the table and used the insert command:
//assuming table is the name of the table you want to add columns to
table.Cell(1, table.Columns.Count).Select();
word.Selection selection = table.Application.ActiveWindow.Selection;
selection.InsertColumns();
This might actually be a better way to add columns, as the api gives you way more options on how to insert (i.e. use InsertColumnsRight to insert to the right of the column). The Columns.Add(...) function by default inserts to the left of the select