tommasop#2001
Explore posts from serversAEAsh Elixir
•Created by tommasop#2001 on 6/27/2023 in #support
How can I retrieve attributes from a resource record
Which is the preferred way to extract attributes from an
Ash
record?
Must it be done through Ash.Resource.Info
or through Ash.Changeset
or it should not be done alltogether 🙂
The use case is that I create a record from an external api call and in the same flow I must send a sync to another external api.
I must use the record attributes instead of the received attributes because sometimes attributes coming from the first api are missing.
I need something like Ash.Changeset data or attributes but for the record.5 replies
AEAsh Elixir
•Created by tommasop#2001 on 5/24/2023 in #support
BulkCreate upsert not working

163 replies
AEAsh Elixir
•Created by tommasop#2001 on 5/22/2023 in #support
Bulk create action Changeset Error
I'm using bulk create action with upsert and I'm tryong to test that not valid resources will not be created.
Using this code with a purposedly wrong changeset gives me this error:
I would expect errors to be "nilled"
59 replies
AEAsh Elixir
•Created by tommasop#2001 on 4/27/2023 in #support
If I set an argument default in a Flow I have it `nil` in a custom step
in
MmsBiztalk.Flows.Steps.RollbackResource
the value of input.step
is nil.17 replies
AEAsh Elixir
•Created by tommasop#2001 on 4/12/2023 in #support
Rollback record with Carbonite
I'm trying to achieve the title result.
The problem is that trying to set some fields (like foreign keys and timestamps) back to their previous values will mark the changeset as invalid.
I'm using
force_change_attributes
to try to overcome the problem but it is not woking.
Is there a way to force the changeset to accept all attributes changes without validating them?
Or is there a better way to achieve what I'm trying to achieve?
5 replies
AEAsh Elixir
•Created by tommasop#2001 on 4/3/2023 in #support
Nested flows steps possibly returns differently if using `apply` ?
Sorry if I bother you again on flow issues. This step:
Correctly returns
{:ok, result}
with updated status on resource_record
While this:
returns {:ok, nil}
even if there is no error and the resource_record is updated with the right status34 replies
AEAsh Elixir
•Created by tommasop#2001 on 4/1/2023 in #support
Filter fields to be returned on an Ash.Query and an AshJsonApi route
I'm having a hard time finding out how can I filter returned fields from an
Ash.Query
this is my code:
And I'm supposing it to return only :sku_code
and :quantity
but it returns all the fields as nil
and only the two fields with real data.
Is it possible to filter the returned fields?
Thanks a lot56 replies
AEAsh Elixir
•Created by tommasop#2001 on 1/22/2023 in #support
Ash Flow branch condition
I'm trying to do something like this:
the branch conditions is the following:
The strange thing is that the branch executes even if the record is found. I understand that condition must be a boolean value.
Is there a way to achieve it with a
read
action or I need to use a custom :get_invoice_data
step?5 replies