Solved

FSM - How to find the column of a view un UI design


Userlevel 1
Badge +5

Hello,

I create a view with SQL, based on task table.

I declare it in the custom metadata. with all the columns -is it mandatory?

Now, I would like to insert data of the view in the task screen with UI designer.

I made a relation in the “Child relation editor and “added a screen field from the view”

 

Now, when I open a task i ‘ve got this message :

Complete message in attachments.

Did i forget a step?

 

Thanks in advance for you help.

 

 

 

 

icon

Best answer by Saranga Amaraweera 22 April 2022, 12:23

View original

11 replies

Userlevel 3
Badge +8

Hi,

 

A few things that may help you.

  1. in the custom metadata, empty the Policy data.  Policy Name and Policy Namespace.
  2. In the UI Designer, Child Relation Editor.  Reverse the table tables.
    1. parent should be task
    2. child should be ac_task_duration_view

Sincerely,

-Rudy

Userlevel 1
Badge +5

Thanks for you answer.

 

I refresh the cache and close FSM sessions.

 

But it doesn’t work. I always have the same message.

 

Userlevel 6
Badge +26

@7opRenauN 

Try defining the relation as well in custom metadata

 

And follow point 2 above as mentioned by Rwjgoedhart

Cheers!

Userlevel 3
Badge +8

@7opRenauN,  can you share an updated screenshot of Metadata & Child Relation in UI? 

Userlevel 7
Badge +22

Hi @7opRenauN ,

Please refrain using the fields like Table Namespace, Policy Namespace, Policy Name unless you’re doing a customization for existing policies or a new policy (This applies for all custom metadata creations). Since this is a view you, need to remove all those unnecessary fields and define only the custom metadata name for view. Make sure that your view has been created in the SQL query tool (perform a select query to check whether the view exists). Also when defining custom metadata, make sure the fields are ticked with “In Database” option. The parent-child relationship defined in the ui designer also needs to be amended in the other way around. 

Assuming you have already followed the steps to rectify the mistakes, if it still gives this error probably the incorrectly defined namespace, policy names etc. on custom metadata might reside as cache in the application pool where fsm is hosted. Then it is recommended to do application pool refresh in IIS for both internal and cloud environments. It should clear the error.

Userlevel 1
Badge +5

@Saranga Amaraweera @Rwjgoedhart @Shneor 

Hi,

Thanks for your reactivity !

But sadly, it’s not working… I have the same message.

I can consult my view with the SQL Query (ex :select top(100) * from ac_task_duration_view).

What i did and complete with your messages:

1 - I create my view in SQL Server management

2 - I add it in Custom Metadata with all column

3 - I add the relationship with task in Custom Metadata:

4 - In Ui designer, I create the relationship in the “Child Relation Editor” (and I can access of columns in the “Add screen fileds”

 

5 - I refresh the cash and restart the IIS.

 

Is it right?

Renaud

 

Userlevel 6
Badge +26

@7opRenauN 

Can you please share your create view script?

Userlevel 7
Badge +22

Hi @7opRenauN ,

I still see Table Namespace. Please remove it and then restart/ refresh IIS. The relationship tab is not quite necessary as you have already defined it there in the UI designer itself but you can keep it.

 

Userlevel 1
Badge +5

@Saranga Amaraweera thanks!

@Shneor  this is my script:

CREATE VIEW AC_TASK_DURATION_VIEW 
AS
SELECT 
TASK_ID,(SCHED_TASK_DUR_MIN/60) AS DUREE_HEURE_J,(SCHED_TASK_DUR_MIN/60)+ FLOOR((SCHED_TASK_DUR_MIN/60)/8)*16 AS DUREE_HEURE_JN
FROM  TASK

 

The message has changed !

 

The erros is from here?

 

Userlevel 7
Badge +22

Hi @7opRenauN ,

This means your view is finally working. :)

Reason for this issue is,

Please note that the TASK_ID is a decimal field. If you’re not quite sure about matching the correct fsm fields, please have a look on fsm metadata. Key fields need to match together according to the given field format in fsm metadata

 

Userlevel 1
Badge +5

It’s working !

 

Thanks!

Reply