ABAS edpimport how to update Employee Bank Details - erp

What is the right way to update employee bank details ( database 96:02 ) using the edpimport.sh.
The difficulty that I am facing is that I want to use the employee ID as the key attribute to reference the required change in ABAS , not the bank details ID( num96 ).

Sorry for the late answer. I usually build a loop in my FOP with a select statement to get the id's i need and then build the edpimport.sh script to run
#!ACTION=UPDATE
#!DATABASE=96
#!GROUP=2
id;field1
(1,2,3);somethinghere
The follow example from the help to use selection statements inside your script manual might work, but I haven't done anything like it.
#!ACTION=STORE
#!DATABASE=20
#!GROUP=1
#!LINESEPARATOR=#
#!FLDDELIMITER=|
#!CHARSET=ISO8859
recordid|such|name|yfeld1|yfeld2\
rowid|ytfeld1|ytfeld2
$,,name=BMW 323;yfeld2=München|BMW|BMW 323|BMW Werke|München\
$,,tfeld2=M-MW 323|ja|M-MW 323\
$,,tfeld2=M-MW 324|ja|M-MW 324
$,,name=Ford Fiesta;yfeld2=Köln|FORD|Ford Fiesta|Ford Werke|Köln\
$,,tfeld2=K-FF 99|ja|K-FF 99\
$,,tfeld2=K-FF 98|nein|K-FF 98\
$,,tfeld2=K-FF-97|ja|K-FF 97
$,,name=Opel Astra;yfeld2=Eisenach|OPEL|Opel Astra|Opel Werk|Eisenach\
$,,tfeld2=GG-OA 123|ja|GG-OA 123\
$,,tfeld2=GG-OA 123|ja|GG-OA 234\
$,,tfeld2=GG-OA 345|nein|GG-OA 345
$,,name=VW Golf;yfeld2=Wolfsburg|VW|VW Golf IV|Volkswagen Werk|Wolfsburg\
$,,tfeld2=WOB-G 999|ja|WOB-G 999
...

Related

Acumatica Customization: Add PO Nbr column to SO Line

I am trying to create a customization to add the PO Nbr associated in the PO Link graph to a column in the SO Line. I know the link is made in the SOLineSplit table, but I am struggling with how to actually show that field in the SO Line. I have made a custom Usr field for PO Nbr, but not sure what I should be entering in the attributes (or DAC extension, whatever is the best way) in order to show the PO Nbr data from the SOLineSplit table.
I remember struggling with this early on, so it's an excellent question. The challenge is that you mention getting to the PO from the SO LINE, but an SO Line can be split across multiple PO's. That's why you end up having to dig into the SOLineSplit for the link. Let's take a look at the link from SOLineSplit to PO...
There are a couple of possibilities when you look into the SOOrderEntry graph. The following code snippets show relationships. Your SOLineSplit may have a direct reference to the PO/POLine as shown here:
PXSelectBase<POLine> selectlinkedDropShips = new PXSelectJoin<POLine,
InnerJoin<SOLineSplit, On<SOLineSplit.pOType, Equal<POLine.orderType>,
And<SOLineSplit.pONbr, Equal<POLine.orderNbr>,
And<SOLineSplit.pOLineNbr, Equal<POLine.lineNbr>>>>>,
Where<SOLineSplit.orderType, Equal<Current<SOOrder.orderType>>,
And<SOLineSplit.orderNbr, Equal<Current<SOOrder.orderNbr>>,
And<POLine.orderType, Equal<POOrderType.dropShip>>>>>(this);
If that simple path doesn't get you there, the more detailed path of an SO to a PO lies in the INItemPlan reflecting the demand of the SOLineSplit (via the PlanID) and then tied to POLine via POLine.PlanID = INItemPlan.SupplyPlanID as shown in the following snippet.
foreach (PXResult<POLine, POOrder, INItemPlan, SOLineSplit> res in PXSelectJoin<POLine,
InnerJoin<POOrder, On<POLine.FK.Order>,
InnerJoin<INItemPlan, On<INItemPlan.supplyPlanID, Equal<POLine.planID>>,
InnerJoin<SOLineSplit, On<SOLineSplit.planID, Equal<INItemPlan.planID>,
And<SOLineSplit.pOType, Equal<POLine.orderType>,
And<SOLineSplit.pONbr, Equal<POLine.orderNbr>,
And<SOLineSplit.pOLineNbr, Equal<POLine.lineNbr>>>>>>>>,
Where<POLine.orderType, Equal<Required<POLine.orderType>>,
And<POLine.orderNbr, Equal<Required<POLine.orderNbr>>,
And2<Where<POLine.cancelled, Equal<boolTrue>,
Or<POLine.completed, Equal<boolTrue>>>,
And2<Where<POOrder.orderType, NotEqual<POOrderType.dropShip>,
Or<POOrder.isLegacyDropShip, Equal<True>>>,
And<SOLineSplit.receivedQty, Less<SOLineSplit.qty>,
And<SOLineSplit.pOCancelled, NotEqual<boolTrue>,
And<SOLineSplit.completed, NotEqual<boolTrue>>>>>>>>>
.Select(graph, poOrder.OrderType, poOrder.OrderNbr))
{...
As you can imagine, you would have to set some rules around restricting an SO Line to a single PO, but that honestly would be more trouble than it's worth as the standard functionality is valuable in being more robust. I would suggest either putting your link in the Allocations list (or Line Details in more recent versions of Acumatica ERP) or produce a smart panel popup to show all the PO links per splits of the current SO Line.

Need to remove numbers with a javascript code step in Zapier

I am not a developer but have used Google search and trial and error test scenarios with Zapier for the last few days and have given up on figuring this out myself. I need help!
I'm using the Run JavaScript code step in Zapier and provided the following details to Input Data.
It says: What input data should we provide to your code (as strings) via an object set to a variable named inputData?
I'm using "street" with a street address example "1402 Spring Garden Rd"
What is the code to use that regardless of the street address provided all the numbers and first space are removed so that the results is "Spring Garden Rd"
Thank you in advance!
var street = inputData;
var streetNoNumbers = inputData.replace(/[0-9]/g, '');
return streetNoNumbers
The error message I'm getting is
TypeError: inputData.replace is not a function
I've learned that strings are immutable and a new string can be made from manipulating another string but doing this in zapier seems to require a function and creating another var with the calculation generates a ... is not a function.
I've tried to write a function but can't get the output or return to show the proper results either.
I can do the following successfully,
var street = inputData
return street
1402 Spring Garden Road
I want to include the code that manipulates street to produce the following:
Spring Garden Road
David here, from the Zapier Platform team. Great question!
The key understanding you're missing is that inputData is a js object with a street property. Before your code is run, we set it up like so:
const inputData = {street: '1402 Spring Garden Rd'}
Since inputData is an object, it doesn't have a replace method (the error you're seeing). Instead, perform your operation on .street and return that.
Try the following:
// need to return an object, not just a string
return {streetNoNumbers: inputData.replace(/[0-9]/g, '')}
If you want to learn more, I recommend our simple examples: https://zapier.com/help/code/#simple-email-extraction

How to correctly return a list of dictionaries in Zapier Code (Python)?

The Zapier code documentation says that the output of a code zap can be either a dictionary or a list of dictionaries (See "Data Variable" section: https://zapier.com/help/code-python/).
When doing this,
output = [{'Booking':'Shirt'},{'Booking':'Jeans'}]
the output of the code returns only the first dictionary, however:
runtime_meta__duration_ms: 2
runtime_meta__memory_used_mb: 22
id: [redacted]
Booking: Shirt
Fields with no value:
runtime_meta__logs
What am I doing wrong here? Thanks a lot!
David from the Zapier platform team here. Code steps returning an array is a mostly undocumented (because there's no UI support and it's confusing, as you can tell) feature.
When testing, it'll only show the first item in the array. When it runs for real, all steps after the code step will run for each item in the array. The task history will reflect this
So set up the zap and turn on and it'll work like you expect.
Sorry for the confusion and let me know if you have any other questions!
For anyone still looking for an answer to this questions, below is what find out returning list in Zapier.
# first import and convert your input value to an array.
# special note any line items imported into a python variable are converted to list format.
my_items = input_data['my_CSV_string']
my_list_of_items = my_items.split(",")
# Create a new list array
my_new_list = []
length = len(my_list_of_items)
#Do all your computations
for i in range(length):
my_new_list.append(float(my_list_of_items[i])*1.5)
# After completing any tasks you can return the list as follows,
# If you are using line items keep the list in its original format
return {
'my_processed_values': my_new_list,
'original_values': my_list_of_items
}
# If you want to return it as a CSV "basically making the array flat"
my_old_CSV_list= ','.join(map(str, my_list_of_items))
my_new_CSV_list= ','.join(map(str, my_new_list))
return {
'my_processed_cvs_values': my_new_CSV_list,
'original_values': my_list_of_items
}
Hope this helps. I am not a Python expert but in theory the more lists used the longer the zap will take to process. Try to keep your python processing time to the lowest.
Best,

Access 2010 multiple field textbox not showing all

A textbox in a report I am trying to show properly is hiding multiples, even though the second field is different.
For example: "=[Client] & " " & [Invoice]".
If there is a Bob with multiple invoices, the report will only show one Bob and the lowest invoice number.
How can I make the textbox show every client and invoice individually?
Thanks.
Edit: The SQL requested
"SELECT [SUMFCRR&Plaintiff].Firm, [SUMFCRR&Plaintiff].[Firm Type], IIf([ReportID] Is Null,0,Val([ReportID])) AS [Report #], [SUMFCRR&Plaintiff].SumOfFeesBilled, [SUMFCRR&Plaintiff].[SumOfRecommended Reduction], [SUMFCRR&Plaintiff].[SumOfCosts Billed], [SUMFCRR&Plaintiff].[SumOfCost Reduction], [SumOfFeesBilled]+[SumOfCosts Billed]+[SumOfRecommended Reduction]+[SumOfCost Reduction] AS Reimbursement, [SUMFCRR&Plaintiff].Plaintiff, [SUMFCRR&Plaintiff].ReportID, [SumOfRecommended Reduction]+[SumOfCost Reduction] AS ReductionSum, [SUMFCRR&Plaintiff].Invoice, ([SumOfFeesBilled]+[SumOfRecommended Reduction]) AS FeeReimbursement, ([SumOfCosts Billed]+[SumOfCost Reduction]) AS CostReimbursement, -[SumOfRecommended Reduction] AS PositivefeeReduction, IIf([positivefeereduction]>[sumoffeesbilled] Or [sumofcost reduction]>[sumofcosts billed],"E"," ") AS ErrorNote, -[sumofcost reduction] AS PositveCostReduction
FROM [SUMFCRR&Plaintiff]
WHERE ((([SUMFCRR&Plaintiff].Firm) Like [which firm?] & "*") AND (([SUMFCRR&Plaintiff].ReportID)=[which report?]))
ORDER BY IIf([ReportID] Is Null,0,Val([ReportID]));"
Edit2: The two fields of concern here are [Plaintiff] and [Invoice], and all information is shown when I run the query itself.
Fixed it. It was originally in the [Plaintiff] grouping. I changed the group to [Invoice], and the multiple invoice numbers started showing.

Raw SQL Insert into remote ruby on rails database

I am having trouble with inserting data into an sqlite development database.
My app has 2 servers, one that scrapes browsers (browserscraper) and another that serves client requests. Each of these have a production and development.
I'm setting up development to insert the final scraped data into my development client request server however I can't get the insert to work. I suspect it is related to escaping the content properly but i have been on google for several hours trying to figure this out.
Here is the insert going from my scraping app to my remote client app
#sql_insert = "INSERT INTO #{#table} (`case_number`, `style_of_case`, `circuit`, `judge`, `location`, `disposition`, `date_filed`, `disposition_date`, `case_type`, 'lead_details', 'charge_details')"
#sql_values = " VALUES (#{self.case_number.to_blob}, #{self.style_of_case.to_blob}, #{self.circuit.to_blob}, #{self.judge.to_blob}, #{self.location.to_blob}, #{self.disposition.to_blob}, #{self.date_filed.to_blob}, #{self.disposition_date.to_blob}, #{self.case_type.to_blob}, #{self.lead_details.to_blob}, #{self.charge_details.to_blob});"
#db = SQLite3::Database::new('E:/Sites/aws/db/development.sqlite3')
#db.execute(#sql_insert + #sql_values + "COMMIT;")
The ultimate query looks something like this (quite ugly i know). The last two that i am inserting are yaml
INSERT INTO lead_to_processes (`case_number`, `style_of_case`, `circuit`, `judge`, `location`, `disposition`, `date_filed`, `disposition_date`, `case_type`, 'lead_details', 'charge_details') VALUES (130025129, 130025129 - CITY, 1st(Jim, Counties), LOVEKAMP, KELLY LAREE, Schuyler, Plea Written, 03/19/2012, 03/19/201, Municipal Ordinance - Traffic, ---
1-address_line_1: 6150 RICHLAND RD
1-address_line_2: ''
1-city: 'GEORGIA'
1-birth_year: '1955' 
1-is_alive: 1
, ---
1-Description: Not Available }
1-Code: '95220'
);
You're not hacking PHP in 1999 so you shouldn't be using string interpolation to talk to your database. SQLite3::Database#execute supports placeholders, please use them; your execute should look something like this:
#db.execute("insert into #{#table} (case_number, style_of_case, ...) values (?, ?, ...)", [
self.case_number.to_blob,
self.style_of_case.to_blob,
...
])
That way the database interface will take care of all the quoting and escaping and whatnot for you.
I'm not familiar with Ruby or SQLite, but purely looking at your query you have the last two column names quoted incorrectly with single quotes. 'lead_details' and 'charge_details' should not need to be in quotes unless you use back ticks like the other column names.
Further to that, the values you are inserting are not quoted correctly either. Most languages provide a function to escape and quote database strings appropriately.
I would also suggest checking what the actual error message from your insert is as it should help point you towards the problem in situations like this.
INSERT INTO lead_to_processes (case_number, style_of_case, circuit, judge, location, disposition, date_filed, disposition_date, case_type, 'lead_details', 'charge_details') VALUES (130025129, 130025129 - CITY, 1st(Jim, Counties), LOVEKAMP, KELLY LAREE, Schuyler, Plea Written, 03/19/2012, 03/19/201, Municipal Ordinance - Traffic, --- 1-address_line_1: 6150 RICHLAND RD 1-address_line_2: '' 1-city: 'GEORGIA' 1-birth_year: '1955' 1-is_alive: 1 , --- 1-Description: Not Available } 1-Code: '95220' );
It looks like, starting with 130025129 - CITY, your input values are not surrounded with quotes, so the query parser cannot parse it. I would surround each string value with single quotes.

Resources