Skip to main content
Solved

How to make value of non-persisted field available on web service endpoint

  • Dec 7, 2022 8:03 PM UTC
  • 7 replies
  • 243 views
  • Translate All

davidrichards12
Freshman II
Forum|alt.badge.img

I have a method, FooBar() that returns a value that I want to be made available on my web service endpoint. I display the value on a non-persisted field by setting it in the RowSelecting event, but it does not make it to the endpoint?

 

How can I get the value of my non-persisted field to the endpoint?

Best answer by davidrichards12

So I ended up taking a different tack on this one. Thankfully, what I needed to populate this non-persisting field was able to be boiled down to a BQL statement. As such, I was able to us PXFormula on the field itself to populate it. This made the value available for both the screen and the API endpoint.

 

Thanks for all your responses and willingness to help.

View original

7 replies

Laura03
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Dec 7, 2022 9:07 PM UTC

@davidrichards12 , I think the proper spelling is FUBAR. 🤣

Thanks for making me laugh today, I needed that!  (Sorry, I can’t answer your question.)

Translate

Forum|alt.badge.img+8
  • Captain II
  • Dec 7, 2022 9:26 PM UTC

And just confirming that the field is available when you’re configuring the endpoint?  It’s just that the value returned in the JSon payload is blank/empty?

Translate

davidrichards12
Freshman II
Forum|alt.badge.img

@ddunn , yes, that’s correct. The field is in the payload, but it is empty.

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

@davidrichards12 try filling it in FieldSelecting. Does it make a difference?

Translate

davidrichards12
Freshman II
Forum|alt.badge.img

@Dmitrii Naumov , I tried FieldSelecting and it does not make a difference. Thanks.

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

@davidrichards12 Ok, I see. How do you fill the value?

Do you rely on other fields from the record when filling this virtual field?

 

Translate

davidrichards12
Freshman II
Forum|alt.badge.img

So I ended up taking a different tack on this one. Thankfully, what I needed to populate this non-persisting field was able to be boiled down to a BQL statement. As such, I was able to us PXFormula on the field itself to populate it. This made the value available for both the screen and the API endpoint.

 

Thanks for all your responses and willingness to help.

Translate