How to allow user to add information for every fields in forms - user-interface

i have a strange user request: they want to be able to say for every fields in every forms from where they get information used to compile it.
value must be selected from a list
essentially iam looking a way to avoid to double the fields.
one way can be add a M:M table where link field-name and information-source
but using this for retrive from real data table only fields derived from an info-source can be really bad
EDIT
to be more clear the solution i want to avoid is to have a data table like this:
fieldname1
fieldname1Origin
fieldname2
fieldname2Origin
fieldname3
fieldname3Origin
...
but i do the link table in this way:
FieldName
OriginId
i have to map oll field names and to search in it with string name when i need to query data table i have to do something like this
select
case when (exists select 1 from LinkTable where FieldName='fieldname1' AND
OriginId=SelectedID) then fieldname1
else NULL
end
for every fields

What about mixing several controls, such as a combobox with all lines, that would trigger the display of all columns of that line.
Something like that (I am currenlty working on that project):

Related

How to add rows to an Excel table inside a loop after the columns are mapped?

How to add rows to an Excel table inside a loop after the columns are mapped?
I tried the "Add rows to an Excel table" step, but I can't grab the values from Column1 and Column2 on the "Select" step above.
This should be easy, I guess, but I can't make it.
Thank you,
Your "Select" actions looks like it might be missing something, seems like it will add the whole item to "Column1" and duplicate that for "Column2". If your value is an array but it is not being recognized as so, you can use the "Parse JSON" action, or the json() expression you should be able to select the keys that you want to use for each column.
I might need more details to see the exact issue with your flow, but in the meantime try this:
Parse JSON action
Here the "Initialize variable" will be your blob storage result.
In the Parse JSON, add you blob storage value
In the "Select" action use the body output of the "Parse JSON" action
You should be able to select the specific values you want in your columns
json() expression
The parameter will be your blob storage. In my example is my string variable sown in the image.
Since the "Select" action returns an array as a result, the next step you should use is the "Apply to each" action
The new values mapped in the "Select" action should be available to be used here, if for any reason they are not (it is common for power automate to have issues like this) you can use an expression to get the value
items('Apply_to_each')?['columnName']
Note that the "Apply_to_each" inside "items" will be different if you rename this action.
Then, you'll have your Excel file with all the rows added to the table you selected.

How can I select a specific row and column from a DBGrid lazarus?

I want to save a specific value that is on a specific row and column. How I can do this? I already search, but I didn't find anything
One doesn't save a value from the grid but rather from the underlying dataset. The following is for Delphi, but I understand that Lazarus is near enough the same. Let's say that the grid is displaying data from a query qTest that has fields id, surname, forename, date of birth (DOB). In Delphi, one can automatically have variables created with names qTestID, qTestSurname, etc. Another way of referring to the variables is by use of the 'fieldbyname' syntax - qTest.fieldbyname ('surname').asstring.
Write a dblClick handler for the grid: when one gets to the row that holds the required data, perform a double click. In the handler, the fields of the row will now be available as qTestID.asinteger, qTestSurname.asstring, etc.

Removing a dynamic list of columns in powerquery

I'm working on a tool to help my team identify changes in some data files. Long story short, i managed to put something together (I'm quite the beginner with powerquery and M) that works well but it lacks user friendliness.
Issue is that not all team members need the tool to check for differences in all columns (different people, different interests). In order to manage this i used the following to remove all the unneeded columns before doing the compare:
= Table.RemoveColumns(myTable,{"col1","col2","col3"... etc
This works but if you want to change the configuration you need to go into the code and modify the list.
My question is the following: Is there any way to integrate a dynamic list into this code? i.e. have that list of columns in an easy to use table, "tick/untick" the ones you want and have the code remove the rest?
If your intent is to allow the user to select columns without entering the query editor then you may benefit from using a parameter table as described here: http://www.excelguru.ca/blog/2014/11/26/building-a-parameter-table-for-power-query/ . You should be able to expose a 2colxNrow table to the user with some predefined column names/numbers. You can use data validation to constrain user inputs to a binary on/off behavior ( https://support.office.com/en-us/article/Apply-data-validation-to-cells-29fecbcc-d1b9-42c1-9d76-eff3ce5f7249 ).
( P.S. Based on the your description of your goals Inquire add-in may alread offer the functionality you are looking for )
Probably the easiest way is to use "Choose Columns" on the Home tab in the Query Editor and then rename the generated step like:
#"CHOOSE COLUMNS HERE ----->" = Table.SelectColumns(Source,{"Column1", "Column2", "Column3", "Column5", "Column7", "Column8", "Column9", "Column10"})
Then when you want to adjust the selected columns, you can press the small wheel to which the arrow is pointing, and a popup will show up from which you can do your (un)ticking.
Alternatively, if you use multiple queries with the same selection, you can create an additional query that outputs a list, like:
let
Source = Table.FromList(List.Transform({1..10}, each "Column" & Text.From(_)),null,{"Available Columns"}),
Transposed = Table.Transpose(Source),
#"CHOOSE COLUMNS HERE ----->" = Table.SelectColumns(Transposed,{"Column2", "Column3", "Column5", "Column6", "Column8", "Column9", "Column10"}),
TransposedBack = Table.Transpose(#"CHOOSE COLUMNS HERE ----->"),
ConvertedToList = TransposedBack[Column1]
in
ConvertedToList
And then use that list in your queries, like:
= Table.SelectColumns(#"Transposed Table",SelectedColumns)
where SelectedColumns is the name of the query with the selected columns.

GWT (smartgwt) grid sort selected records top

I have a grid where the user can select records via checkbox in front of every record. Now I have a requirement to sort the records based on their selection, so that all selected records should be placed top, followed by the not selected ones.
Is there any standard function to achieve this? As an alternative I thought of saving the selection state as an attribute on every record and sort based on the attribute.
The code for the column is:
gridRealmDt.setSelectionType(SelectionStyle.SIMPLE);
gridRealmDt.setSelectionAppearance(SelectionAppearance.CHECKBOX);
I try to describe the code I use as the affected code is deeply nested in our own framework classes.
gridRealmDt is a subclass of smartgwt ListGrid. In my Dialog a create an instance of the grid which creates an instance of a database bound datasource. When the dialog is loaded the records are fetched from the database and after that a registered an dataArrivedHandler where I select the records which match records from another table.
I tried to place the selection attribute in an extra field and use that for sortig before my other sort criteria, but this does not work. Here is the code for the field I am using.
ListGridField txtSelected = new ListGridField(SELECTED, "");
txtSelected.setHidden(true);
txtSelected.setSortByDisplayField(true);
txtSelected.setCanSortClientOnly(true);
When I do not set the canSortClientOnly property the order by is sent to my database resulting in an error, as the table does not contain that field, so I set the property. Now I get following error
Removing field from the sort Specifier array because it specifies canSort Client Only: true and all data is not yet client-side.
I also tried to use a sortNormilizer on the Name field which is my main sort criteria, but the normalizer is called before the selection value is set to the record.
record.setAttribute(CARealmDS.SELECTED,selected ? "a" : "b");
I also cannnot find a way to call the normalizer when selection changes.
Currently we are using Smart GWT Version 6.0p.
I don't think there is any standard function. Just use grid store update. Place checked items first.

Passing more than 3 items in a reports column link

I have a report that is listing students and I want a column to edit a student. I've done so by following this answer:
How do you add an edit button to each row in a report in Oracle APEX?
However, I can only seem to pass 3 items and there's no option to add more. I took a screenshot to explain more:
I need to pass 8 values, how can I do that?
Thanks!
Normally, for this you would only pass the Primary Key columns (here looks like #RECORD_NUMBER# only). The page that you send the person to would then load the form based on the primary key lookup only. If multiple users were using this application, you would want the edit form to always retrieve the current values of the database, not what happened to be on the screen when a particular person ran a certain report.
Change the Target type to URL.
Apex will format what to already have into a URL text field which magically appears between Tem3 and Page Checksum.
All you need to do is to add your new items and values in the appropriate places in the URL.
I found a workaround, at least it was useful to my scenario.
I have an IR page, query returns 4 columns, lets say: ID, DESCRIPTION, SOME_NUMBER,SOME_NUMBER2.
ID NUMBER(9), DESCRIPTION VARCHAR2(30), SOME_NUMBER NUMBER(1), SOME_NUMBER2 NUMBER(3).
What I did was, to setup items this way:
P11_ITEM1-->#ID#
P11_ITEM2-->#DESCRIPTION#
P11_ITEM3-->#SOME_NUMBER##SOME_NUMBER2#
Previous data have been sent to page 11.
In page 11, all items are display only items.
And P11_ITEM3 actually received two concatenated values.
For example, the calling page has columns SOME_NUMER=4 and SOME_NUMBER2=150
so, in pag1 11, P11_ITEM3 shows 4150
In page 11 I created a Before Footer process (pl/sql expression)
to set up new items, for example P11_N1 as source SUBSTR(P11_ITEM3,1,1)
and item P11_N2 as source SUBSTR(P11_ITEM3,2,3)
So, I had those items with corresponding values from the calling IR page.
The reason I did not pass the primary key only for new lookup access, is because i do not want to stress database performing new queries since all data are already loaded into page items. I've been an oracle DBA for twenty years and I know there is no need to re execute queries if you already have the information somewhere else.
These workarounds are not very useful for a product that bills itself as a RAD tool.
Just include a single quoted word in the select statement (Select col1, 'Randomword', col2 from table 1;)
Then define that column as a link and bingo! More items than 3 to select.

Resources