How to create dynamic table in pyqt5 and save them as a text file? - qt

I want to create a widget, which is used for mapping. The widget should contain a push button (Add), which when clicked should add rows and only 2 columns, so that user can enter the value. I want to create a table that allows dynamic creation of rows and user input.
This is how the ui should look
After creating this form, I would like to save this form as a txt file but with comma separated values.
The text file would have values like:
Left1,Right1
Left2,Right2
Any sort of help will be much appreciated.

Related

How write collection columns values to columns in table in word document in blueprism

I am working in blueprism and I have to loop through a collection to write back certain columns in the collection to a word file (using Business Object: MS Word VBO, and Action: Type Text). The current setup writes the collection columns values at the beginning of the word file. I would like to have those collection columns to be written in a specific table that already exists in my word template file. How can I achieve that?
Current process:
enter image description here
The current way the collection column values are written in word file:
enter image description here
I tried Set Table Cell Value and it solved my problem.

Filename as Measure in PowerBI

I am trying to create a dynamic title for a dashboard that shows the name of that file. I will use a button and the "fx" option for dynamic Button Text.
E.g. a file saved under "C:\Users\xyz\Product A.pbix" would show the button text "Product A".
Is there a way to get the file name into a measure or another way to display it using fx?
Alternatively, is there a way to grab the name of the data source?
(Reason is I will have multitude of dashboards and will already need to change the filename... would prefer to not also have to change each title manually).
Get Data --> Folder and select your files localation.
By doing that, a table with all your file names and other stuff will be loaded.
Then you just have to clean the table and create the measure that select the file name.

Lookup field appears as numerical values instead of text on Access report

I am trying to create a report putting a field called contact which has the name of a person. This name is linked directly to another table where I keep all the contacts.
For some strange reason, when I include this name (which in query view displays as the name of the contact), instead of the name appearing, the unique ID number is shown on my report.
As mentioned in the article cited in the above comment, you can use a Combo Box control on your report to do the lookup for you. To see how this can be done, create a new report based on the table containing the lookup field, then drag and drop that field onto the report. That will create a Combo Box control with properties that look something like this:
Row Source: SELECT [Clients].[ID], [Clients].[LastName] FROM Clients;
Bound Column: 1
Column Count: 2
Column Widths: 0";1"
You could use a similar Combo Box control on your actual report to display the client's name rather than their numeric ID value.
Another alternative would be to change the Control Source of the report's Text Box control to have it do a DLookUp() on the table. If the lookup field is named [client] then changing the Control Source of the Text Box to something like
=DLookUp("LastName","Clients","ID=" & [client])
would also work.
I wanted to add to the great answer by Gord:
When using a "web" database (started in Access 2007 I think), you cannot change a report's fields to ComboBox style, nor can you use DLookUp(). (web databases lack a ton of features)
The workaround for this, if you want to create a Web-Report that uses lookup fields, is to create a Web-Query first based on your Web-Table (all the Web-* stuff has a www planet icon over the logo, if you create a new Web-DB in Access 2007+ you'll see what I mean)
So, instead of Table -> Report, you'll have to do W-Table -> W-Query -> W-Report.
Then, the only thing you need to customize to get the data right is the W-Query. Start by trying to reproduce the look in the query to match what you want users to see in the report. Note that here in the query, lookups will work fine (instead of the unique ID's, you get field names like you want). However, this will not carry over to the report. To do that, you gotta get the actual text field name you want into the query:
You should already have one table in your query; start by adding the table that your first lookup field points to. For example, the table I want to print is called Stock_Boards, and it has a lookup field called PCBID_lookup that points to the table Stock_PCBs.
Since you're using lookup fields, there should already be a relationship line between the two tables when you add the second one. If there isn't, something has gone horribly wrong.
Now, see how that line connects two fields on the two different tables? For example, I've got my PCBID_lookup field on my Stock_Boards table, which connects to the ID field on my Stock_PCBs table. If I created a report from this now, PCBID_lookup would be a number, a number that correlates to the ID of a record on Stock_PCBs.
To fix it, I will add the name field I want to show up on the report. In my example, that happens to be a Part Number, rather than the ID. I add the PartNumber field from my Stock_PCBs table to the query, and remove the PCBID_lookup field of the Stock_Boards table from my query.
Since PartNumber is what I want to show up on my report, it effectively replaces the original field (PCBID_lookup)
Repeat for all lookup fields you want in your report.
I had 1 more: I removed the Status field of the Stock_Boards table (which was an ID/Lookup) and added the 'Status' field from the Status table (which was the actual text name)
When finished, your query should look exactly how you want the data to appear, without any special tricks or asking Access to do something unnatural. Save your query, and create a web-report from it. Done!

How to hide one column in grid while exploring to excel

I showed data in gridview.There are lot of column,so used scroll bar to grid.For finding out perticular record,used auto generated select button.Suppose I select one record,it become different in colour.When I exporting data to excel,it shows that coloured column and select button also in excel .So I want to hide that select button and color of row of selected column.Even when I am taking diffrent record,that time also showes one row colored.I want liked this when I am selecting one item from dropdownlist,gridview should get disappered and on button clicked gridview should appered.Gridview has paging and column are auto-generated.
It seems that you are using GridView's RenderControl to export the data. This method writes the current html of GridView. If you want exported data to be formatted other than the GridView's current format then, I suggest that you to use HTML Table method to export the data.

Allow users to enter a variable length list of items in asp.net form

I need to let my users enter a variable length list of items into something that looks like a grid view (or a series of standard text boxes stacked vertically). Each item could be a few characters or a few hundred characters long, and I just want them to enter a "sentence", and then tab to the next row, and always having another blank one ready to go at the bottom of the list.
I don't want to save any data to my SQL Server DB until they enter the entire list and then click on a "save all" button.
When they hit the "save all" button they will be given a preview screen where the data will be presented as standard HTML ordered list.
If they confirm/save, then each row of the grid will then be saved as a separate row into my SQL Server database (with an index to remember the order).
What ASP.Net (or Jquery/javascript) UI control would be the best to use in this situation? (i.e. just for the data entry part - the rest I got covered).
Seems like you are looking for something similar to this:
http://www.highoncoding.com/Articles/374_Adding_Multiple_Rows_in_the_GridView_Control.aspx

Resources