Changing stock levels for parts in a project.

18 views
Skip to first unread message

dmt...@gmail.com

unread,
Jul 18, 2020, 10:24:41 AM7/18/20
to PartKeepr Users
Hi!

I'm evaluating this program for future use. In static conditions, it works very good, its easy to create part and projects. Now I'm trying to make dynamic changes to the database, like when Parts associated with a project are being used, and the stock level for the projet parts should change.

I would like to change the stock level of all the parts associated with a project, with a batch job, where i'm querying the project name, and updating the stock level of the parts.
Details:
Base entity: PartKeepr.ProjectBundle.Entity.Project
Query fields: name = "PolyDAC"
Update field: pats.part.stockLevels.stockLevel = 1000.

I'm getting an error "Cannot read property "part" from an array. Maybe you intended to write the property path as "[part]" instead.".

Is this the proper way to do this task?
Can a more experienced user help me out?

Thanks!

Best regards,
Daniel Bognar

Felicia Alexa Hummel

unread,
Jul 18, 2020, 11:06:29 AM7/18/20
to partkee...@googlegroups.com

On 2020-07-18 16:24, dmt...@gmail.com wrote:
> Hi!
>
> I'm evaluating this program for future use. In static conditions, it
> works very good, its easy to create part and projects. Now I'm trying
> to make dynamic changes to the database, like when Parts associated
> with a project are being used, and the stock level for the projet
> parts should change.

That's what the Project Reports are for.


> Update field: pats.part.stockLevels.stockLevel = 1000.

stockLevel is a runtime-calculated value based on the stock history. You
cannot change that value directly.

All the best

Felicia

dmt...@gmail.com

unread,
Jul 18, 2020, 1:05:22 PM7/18/20
to PartKeepr Users
Dear Felicia,

Thank you for the quick response!
Somehow I missed this functionality.

Best regards,
Daniel
Reply all
Reply to author
Forward
0 new messages