Error passing record type in Process Model

Certified Senior Developer

Hi,

I called a summary view interface in another interface using record relationship but having problem in the process model. 

This is my Phase Title Interface calling another interface 'Summay View' using the rule input "titleinput" which is a record type. The interface works fine but when I try to create a process model, I am not able to call the parameters. 

The expression used: 

a!formLayout(
label: "Selected Project",
contents: {
a!sectionLayout(
contents: {
rule!MD_PM_ProjectSummaryView(ri!titleinput['recordType!}MD_PM_PhaseTitle.relationships.}mdPmProjectdetail']) - I used the record relationship here. 
}

Process model:

Is it because titleinput is a record?

how to resolve this issue? or how can I use summary view interface in Phase title interface without using the title input record type?

Please advice. 

TIA.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Hi Mike,

    Thanks for the prompt response. I am just trying to figure out the methods to use record relationships in interfaces. 

    I tried changing the rule input to CDT but I am getting the below error:

    "Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'md_pm_projectsummaryview' at function a!integerField [line 6]: Invalid index type: Record relationship uuid: c4ecb714-5dcf-44a1-a824-db3ef50a5285 Record type uuid: facc26ec-c1c0-4a54-80e5-cf61552088b0 Relationship path: null"

    I want to use only one rule input to access the other record. How can I do that? 

    Should I pass two rule inputs to make it work? 

    Will a!queryRecordType() help to resolve this issue? If so, where and how can I use it here? 

    Thanks

  • 0
    Certified Senior Developer
    in reply to Sandhya

    Hi , summary view interface is basically used for record view in record type. I would suggest you to query your data in a local variable and then pass it to your fields. You can use queryentity or queryRecordType and yes you can use related data using a!relatedData in queryRecordType.

  • 0
    Certified Senior Developer
    in reply to GopalK

    Hi Gopal,

    Thanks for your reply. 

    Can you advice how I should be using local variables to do this? Should I use  queryRecordType for each field?

    I am clueless and would appreciate your help.

    Thanks.

  •   AFAIK process variables can't be Record Type

    ...yet! Watch out in a future version of Appian!

  • 0
    Certified Lead Developer
    in reply to Stewart Burchell
    Watch out in a future version of Appian

    I'll be watching and... cringing, i'm sorry to say.  Until / unless record types get as easy to use as CDTs and/or can be typecast back and forth with CDT data.

  • 0
    Certified Lead Developer
    in reply to Sandhya

    To best answer this you'll probably need to provide some background detail for us, such as what inputs you're starting with, what information you want/need to pass into your Related Action, and what your output/result needs to be.

    With those sorts of questions left unanswered, my default suggestion is to perhaps just pass in the Primary Key ID to your form, then query its CDT value using a!queryEntity(), and use that data on your form for display purposes.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Above is a project summary view using the rule input projectinput. 

    I am calling the project summary view interface in another interface Phase Title. I am using titleinput which is of phasetitle CDT to call the project summary interface. 

    How to reference the fields of summary view using titleinput rule input? Prjoject and PhaseTitle have one to many relationship. 

    I fixed the problem(don't know if this is a good practice) by using the expression: 

    a!formLayout(
    label: "Selected Project",
    contents: {
    a!sectionLayout(
    contents: {
    rule!MD_PM_ProjectSummaryView(ri!titleinput.projectid)
    }
    ),

    Both the interface and process model are working fine. 

    But want to know how to use queryrecordtype() to do the same function.

    I have another interfaces that must use the Phase title interface and don't know if the above expression will work the same way.

    Thanks