cancel
Showing results for 
Search instead for 
Did you mean: 

Save Extension Field

0 Kudos
255

Hi Experts

I have added an Extension Field to an RFX which I go count the number of RFx Responses and display it on screen. My problem is how do I save that same value on the database so I can read it from a Query. The script Target is on "Loaded".

supcolln = doc.getProposals();

number = supcolln.size();

doc.getExtensionField("EXT_Supplier_Count").set(number);

How do I get to save the set value to the database.

Thanks in advance

View Entire Topic
Former Member
0 Kudos

Hi,

You should just move your exact code from 'Loaded' to 'Validate' script.

PS: if the only purpose of this is the query result, you can do the calculation directly in the query without the need of an extension field.

Bogdan

0 Kudos

Hi Bogdan

I think the idea of getting it directly from the query result is a perfect one. May you please assist of how the code on the result field be constructed.

Regards

Former Member
0 Kudos

? ... COUNT

( SELECT COUNT(*)

   FROM {rfx response table} frr

   WHERE frr.PARENT_OBJECT_ID = {parent alias}.OBJECTID )

this is the most simple form ... you should query as per your specific requirements.

Bogdan

0 Kudos

Works like a charm. Thank you very much