Skip to main content
Answer

Substitution lists with GIs

  • November 15, 2024
  • 3 replies
  • 150 views

estebanperalta54
Captain II
Forum|alt.badge.img+4

Hi! Does anyone know if you can use substitution lists with GIs? I’m trying to use them instead of using a long IF formula. This is what it looks like and the error:

 

 

 

Best answer by estebanperalta54

I looked further into it and  learned that the Substitution lists do not work in Generic Inquiries and are only meant to be utilized in Import Scenarios. Instead, I used a switch formula:

 

3 replies

josborn02
Varsity III
Forum|alt.badge.img+1
  • Varsity III
  • November 15, 2024

You could create another GI and use it as a subquery that contains all the lookup values you need for the primary GI.  This functionality was released in 2024 R1.


estebanperalta54
Captain II
Forum|alt.badge.img+4

I looked further into it and  learned that the Substitution lists do not work in Generic Inquiries and are only meant to be utilized in Import Scenarios. Instead, I used a switch formula:

 


plambert
Semi-Pro I
Forum|alt.badge.img+2
  • Semi-Pro I
  • May 6, 2025

For posterity, another option is to join in the PX.Api.SYSubstitutionValues DAC, which is where the Substitution Lists’ values are held. In this situation, you could Left join onto POOrder with the relations below to mimic SubstituteListed. An inner join would more closely mimic SubstituteAll.

Then display the SYSubstitutionValues.SubstitutedValue in the results grid instead of POOrder.AtributePODEST.

 

This way is more maintainable, since you can change the Substitution List as needed and don’t need to dive into hard-coded values in the GI.