Hello everyone. I am new in Appian and am trying to build a web app "Canteen" as part of my learning path.
Couldn't find anything in other posts as I don't know how to search it.
So my issue is the following...
I have a Canteen Menu where each user can select products to add in the cart. On the interface I build a list of
product variations (with a tempId in order to update something since I haven't saved anything on DB). When I press
the "Place Order" button, I want to create a new "Order" with some fields and then get the ID of the created record.
Then I will use the orderId and create the related "Product Variations" from the selected products list.
How can I do this in the process model?
Discussion posts and replies are publicly visible
You have created two thread for the same issue - community.appian.com/.../create-process-model-to-create-a-record-type-order-and-multiple-record-types-product-variation
Your UI looks great!
You do that in the process model just as you explained it. Write the order first, then copy the ID to the items and write these.
Another option is, to use related records, build that structure in the rule input and let Appian do the copy-ID stuff.
https://docs.appian.com/suite/help/23.4/record-type-relationships.html
I don't know how that happened... how do I delete it?
You can't delete it. Let's leave it as it is or maybe you can edit it to make it clear that is a duplicate thread, created by mistake.
Answering your question, you can either save the ID of the newly created record from the output tab of the write records smart service and then map it manually in the child records as shown below in the image.
Or you can simply configure the Order record to also write the Product Variation. I have written a blog on the same that is coming out tomorrow. That should give you better understand of it.
Thank you Stefan! I am a Web Developer with Wordpress and UI is important when I do things... I was hoping I could do more though in APPIAN. I will get used to it... Anyway, as I said am new to Appian and started working on this project for 10-15 days... I feel like am progressing slowly.
I have the related record functions created from the beginning but don't know If I can use them again to combine my processes...
I think what Harshit said above is what will be the solution but still struggling...
Am not sure if what I wrote inside the Records Input is correct...'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order'( 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{75c04d1e-ef37-4f51-83b1-cabfb7b169c0}id': 1, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{cdfc5c50-c0ab-488f-9059-85bf4df21277}message': pv!message, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{d6e316f2-f6a2-4c1c-9ecf-0f09487e43eb}orderStatusId': 1, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{0ed5711c-0959-43e6-be09-ccc9b4439ed8}price': pv!orderTotal)There are also other fields createdBy which is the User id (person who places the order) and createdOn.
Also here tried to do what you told me. I believe this is ok.
I did this as you told me. I think is good.
In the records Input this is what I wrote. Hope it's correct.'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order'( 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{75c04d1e-ef37-4f51-83b1-cabfb7b169c0}id': 1, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{cdfc5c50-c0ab-488f-9059-85bf4df21277}message': pv!message, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{d6e316f2-f6a2-4c1c-9ecf-0f09487e43eb}orderStatusId': 1, 'recordType!{a6586e03-53d4-47ea-8f21-52d658700d3b}ICOS Order.fields.{0ed5711c-0959-43e6-be09-ccc9b4439ed8}price': pv!orderTotal)
createdBy and CreatedOn also have to be set. Don't know if this will be done automatically.
christodoulosp0001 The blog that I talked about should be available here at 10:00 AM IST tomorrow
christodoulosp0001 said:I have the related record functions created from the beginning but don't know If I can use them again to combine my processes...
Yes you can use them , Appian Creates Basic Interface and PM when we click on Generate Actions . We can Customise as per the requirement.
christodoulosp0001 said:I think what Harshit said above is what will be the solution but still struggling...
If you are not maintaining relationship between Order and Product variation your PM gonna look like this
If you are maintaining relation One write Records is enough it map's the generated key automatically.PM gonna look like this
Harshit and I talk about the same things.
Docs here: https://docs.appian.com/suite/help/23.4/Write_Records_Smart_Service.html#create-records-and-related-records-using-a-process-model
When you come from UI dev, keep in mind, that Appian is made to implement process driven apps. So, the business process is the core, processes consume and manipulate data, and UI supports people in navigating in that process. That is the core concept (IMHO), and you can adapt it to less structured case management, and highly automatic processes with just some exception management. Trying to force Appian into being a simple CRUD UI framework, will not work.