It's all about the answers!

Ask a question

How to validate data before submitting asset.


Abhinav Ajmera (22113020) | asked Aug 30 '10, 1:23 a.m.
In RAM API we have method session.put for pushing the data in RAM.

Now is there any available method which will check for validate set attributes and category before submitting asset.

<b>Scenario</b> : Say I am submitting 20 asset, each with 5 MB of physical file thru excel batch upload. Now when my web client triggers batch upload, if there is some mandatory attribute missing in 18th asset, he will get the error message only after either all other assets are submitted (session.putassets) or initial seventeen assets submitted (session.put), which may take a long time.

So is there any way I can check for excel sheet data (asset attribute and category) validity, before actually using session.put..

4 answers



permanent link
Kevin Bauer (34621) | answered Aug 30 '10, 9:42 a.m.
JAZZ DEVELOPER
You can use RAMAsset.validate() to return any validation messages about an asset.


In RAM API we have method session.put for pushing the data in RAM.

Now is there any available method which will check for validate set attributes and category before submitting asset.

<b>Scenario</b> : Say I am submitting 20 asset, each with 5 MB of physical file thru excel batch upload. Now when my web client triggers batch upload, if there is some mandatory attribute missing in 18th asset, he will get the error message only after either all other assets are submitted (session.putassets) or initial seventeen assets submitted (session.put), which may take a long time.

So is there any way I can check for excel sheet data (asset attribute and category) validity, before actually using session.put..

permanent link
Abhinav Ajmera (22113020) | answered Sep 28 '10, 10:43 a.m.
RAMAsset.validate() return validation messages only for required fields. Niether this or RAMSession.put() throw invalid data error for optional fields. (for dropdown/select box attribute, in case of non-required attribute value its skipping that value and submitting other valid values in RAM, but not returning error for invalid values.)

Is there any method which will validate the asset irrespective of attribute condition??



You can use RAMAsset.validate() to return any validation messages about an asset.


In RAM API we have method session.put for pushing the data in RAM.

Now is there any available method which will check for validate set attributes and category before submitting asset.

<b>Scenario</b> : Say I am submitting 20 asset, each with 5 MB of physical file thru excel batch upload. Now when my web client triggers batch upload, if there is some mandatory attribute missing in 18th asset, he will get the error message only after either all other assets are submitted (session.putassets) or initial seventeen assets submitted (session.put), which may take a long time.

So is there any way I can check for excel sheet data (asset attribute and category) validity, before actually using session.put..

permanent link
Gili Mendel (1.8k56) | answered Oct 07 '10, 10:43 a.m.
JAZZ DEVELOPER
As you mentioned, validation is driven by required fields.

Can you give an example of what is it that you are trying to verify, before submitting?

permanent link
shawn lee (6) | answered Oct 08 '10, 1:04 a.m.
You can use RAMAsset.validate() to return any validation messages about an asset.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.