My data is formatted as follows:
A collection of Documents C
----Document A
-------Date Field
-------Collection
-----------User Document
----Document B
...
How would I be able to query the database for all documents in c based on the dat field in each document AND if in each respective document a certain user is in their collection field using swift
Related
In Dynamics 365 Finance and Operations, I created data entity for WMSOrderTrans table. Let's say it's SalesOrderPickingListLines. I've added EntityKey with two fields: orderId and RecId (the same index exists in the table itself, named OrderIdx).
The data entity works without an issue, key fields are in the metadata, I can get a record using data/SalesOrderPickingListLines(dataAreaId='inpl',orderId='myorder',RecId1=myrecordid)
The problem is, that now I need to create OData action for it, but it seems that that the key fields are not seen in the action. I am using Power Automate to test it.
I created a function in the entity's class with this code:
[SysODataActionAttribute('SetPickQuantity', true)]
public real setPickQuantity(InventQty _qty)
{
WMSOrderTrans _wmsOrderTrans;
select firstonly forupdate _wmsOrderTrans
where _wmsOrderTrans.orderId == this.orderId && _wmsOrderTrans.RecId == this.RecId1;
// some code to proceed
return _wmsOrderTrans.Qty;
}
The OData action is seen by Power Automate, but there are no key fields (except Company), so I am unable to perform this action for any record.
Usually it works without doing any other steps so that's why I'm here. The only difference with this and my previous work is that the source table (WMSOrderTrans) does not have a natural key, its index is RecId field. But I am not sure if this is the issue here. Any help will be appreciated.
How can I add data to my django db. Using excel as an input?
I extracted the data but i don’t know to go store it in the database
I have two models patient and doctor. I have extracted the data using xlrd, and got a dictionary:
d ={“name”:list of names,”number”: list of numbers , so on }
I used a forms.form model.
you can access excel data with pandas library, you should first make dataframe and then you can save your data using model.objects.get_or_create method in view.
before that you should first define your table in model for save data .
Does loopback 3 support filters on JSON field of a table ? I am using MySQL database.
For example, we create table 'events' -
CREATE TABLE events(
id int auto_increment primary key,
event_name varchar(255),
visitor varchar(255),
properties json,
browser json
);
Is there any way to apply filter on json fields 'properties' and 'browser' ?
First of all, MySQL doesn't index JSON column (there is workaround but not supported natively), if you go with MySQL, it can be problem in the near feature.
It think it is not possible because doc says that:
Data source connectors for relational databases don’t support filtering nested properties.
However you can implement your own logic for build-in methods via using operation hooks.
For example
Model - the constructor of the model that will be queried
query - the query containing fields where, include, order, etc.
MyModel.observe('access', function **queryToJsonField**(ctx, next) {
// operation goes here
next();
});
More detailed explanation can be found at doc
I am using SharePoint access App and I have bind the left filter with Title field. By default, the list shows all the data including blank title. I want to filter the default list to show data only when title has value. I do not want to create custom action, because I want to hide this data from User.
Is there a way we can filter this data?
I found the answer:
I created a query to filter records where title is not null and updated the default view to pick records from the query.
am Using Apex4.1,
in my application I have one Tabular form which has the following fields,
Emp_id
Emp_name
Dept_id
Here Emp_id is the Updatable column and it is a select list LOV and
Emp_name is a upadatable column,
Here what I need is,
If I select the Emp_id from the LOV ,the Emp_Name should be stored automatically based
on the value selected in EMP_ID,
In tabular form I could not create Dynamic action like creating in normal forms,
Can anyone help me in this issue?
Thank you.
APEX does not currently provide dynamic actions on tabular form items. Hopefully this may be addressed in APEX 4.2 but the Statement of Direction does not explicitly say so.
So for now if you need to do this you will have to write your own Javascript, using the unique IDs of the tabular form items to manipulate them (the IDs look like "fcc_rrrr" where "cc" is the column number and "rrrr" is the row number). See this SO q&q for sample Javascript code that uses these.
The Javascript you need to write is a little daunting (for a beginner), but one thing to note is that in your case you can avoid any need for using AJAX to get the employee name by embedding the name in the return value of the LOV something like this:
select emp_name d, emp_id||':'||emp_name r
from employee
order by 1
This way the return values will look like '123:John Smith'; your Javascript can parse this string and extract 'John Smith' and insert it into the emp_name item on the same row. Obviously you will also need to parse this string to obtain the emp_id value you will need when updating the database when the page is submitted.