Expand my Community achievements bar.

SOLVED

External lookup use case

Avatar

Level 3

Dear All,

 

I’m working on digitizing our product specifications (currently managed offline) and I’m testing custom forms to see what can replace our existing workflow.

 

One key part is that I’m trying to centralize raw material characteristics and similar data within specific project/s, then have the custom forms elsewhere to pull in that data dynamically when required. 

 

I’ve built the following TEST setup, and it’s very close to what I need but it still has a few issues.

 

Project 1 contains a form consisting of a Single line text field “Product Code”.  Users enter “Product Code” value manually, for example 12345ABCDE

 

Project 2 contains a form consisting of:

  1. Typeahead field “Project Name v1” returning Project 1 among other projects within the same portfolio/program
  2. External lookup field “Project Name v2” returning Project 1 among other projects within the same portfolio/program
  3. External lookup fields returning “Product Code” value based on project selected via point 1 or 2. 

Point 3 setup is as follows:

 

Base API URL: $$HOST/attask/api/v21.0/project/search?name={DE:Project Name v1}&fields=parameterValues

 

Or

 

Base API URL: $$HOST/attask/api/v21.0/project/search?name={DE:Project Name v2}&fields=parameterValues

 

JSON Path: $.data[*].parameterValues.["DE:Product Code"]

 

The solution returns “Product Code” value 12345ABCDE as planned, however it does not update when  “Product Code” value has changed to e.g ABCDE12345, instead it retains the initial entry. This could be a positive or a negative depending on how I approach the overall data management.

 

Can someone let me know whether this is standard behaviour, and if there’s any way to work around or resolve it?

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @LukaszMatyszewski ,

 

In short, unfortunately this does not happen automatically. We had a similar use case where our values were changing and discovered the hard way that we need to have additional automation to make sure things are in sync.

 

Basically those External lookup fields are saved as String values so if you have any change that can happen it would be the best to have additional scenario which is looking at events where that specific field value changed for example where “Product Code” value is changed that you also update all projects external lookup field value. Hopefully this makes sense.

Basically 

Project 1 -> Product code = 123
Project 2 -> External lookup field = 123

User changes Product code to 456
Scenario gets the event of change and finds all projects where external lookup field is equal to 123 and change it to 456

Only like this you can ensure consistency.

Hopefully this helps. Please let me know if you have any questions.


Best regards,
Ivan

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hi @LukaszMatyszewski ,

 

In short, unfortunately this does not happen automatically. We had a similar use case where our values were changing and discovered the hard way that we need to have additional automation to make sure things are in sync.

 

Basically those External lookup fields are saved as String values so if you have any change that can happen it would be the best to have additional scenario which is looking at events where that specific field value changed for example where “Product Code” value is changed that you also update all projects external lookup field value. Hopefully this makes sense.

Basically 

Project 1 -> Product code = 123
Project 2 -> External lookup field = 123

User changes Product code to 456
Scenario gets the event of change and finds all projects where external lookup field is equal to 123 and change it to 456

Only like this you can ensure consistency.

Hopefully this helps. Please let me know if you have any questions.


Best regards,
Ivan