Skip to main content
June 21, 2023
Question

Record Type

  • June 21, 2023
  • 7 replies
  • 0 views

Good Evening Appians,

i have a student record type and a course record type and both works fine but the problem is, i want to pick the ID of the particular logged in student and attach it to an interface where it will save to the db on triggering the submit button. Please how do i achieve this ??

    7 replies

    June 21, 2023

    So you want to get Student record data for loggedInUser? You must be having a column in Student table for uniquely identifying the user, like, username or uuid, so you can query on that column. For saving to the database use Write to Data store entity. Anything more specific you want to know?

    June 22, 2023

    yeah, one more question please and many thanks. How do i call 2 different rule expressions and save them to their respective fields when the submit button is triggered ?! i seem to be able to do for only one but not for both at the same time

    June 23, 2023

    What do you mean? Explain?

    harshitb6843
    June 22, 2023

    There are 3 steps to it. 

    1. Query the ID of the logged in user by passing its username as a filter in your student record and store it in a local variable. 
    2. When you click on the submit button, use the button's saveInto to construct an a!save() which will save the ID of the student in the respective CDT's field that should most probably be your rule input (RI)
    3. And finally, when your user input task submits, the process will move forward and using the Write to record smart service, you will be able to write everything to the DB

    Try this and comment if you face any issues. 

    June 22, 2023

    yeah, many thanks but how do i call 2 different rule expressions and save them to their respective fields when the submit button is triggered ?! i seem to be able to do for only one but not for both at the same time

    harshitb6843
    June 22, 2023

    2 different rules? Where does the second one come from?